添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

For appeals, questions and feedback about Oracle Forums, please email [email protected] . Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to create XML with <![CDATA[<?xml

User_RFKSX May 28 2020 — edited Jun 4 2020

Hi,

I have to generate an XML object and I'll use :

select xmlelement("TAG1",

xmlelement("TAG2",col2),

xmlelement("TAG3",

xmlelement("TAG4",col4))).extract('/*')

from MYTABLE ...

I have also to create the line <![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?> .

How can I do it? I've read there's the XMLCdata function but how can I use it?

The XML is something like this:

<TAG1>

<TAG2> 5 </TAG2>

![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<TAG3>

<TAG4> jack </TAG4>

</TAG3  ]]>

</TAG1>

Other question: if I load an XML like that into a XMLTYPE column, is it possible to extract tag values by using extractValue even for the tags inside/after the ![CDATA[ section ?

Thank you!

Mark

Jump to Answer