Using XML with CDATA Sections

XML that contains CDATA sections must not include text or whitespaces before the CDATA section. Use the following examples to enter valid XML with CDATA sections.

Example Entries

TypeEntry

valid entry

<tag><![CDATA[!@#$%^&*()]]></tag>

invalid entry

<tag>

<![CDATA[!@#$%^&*()]]></tag>

Note

If an element contains a comment, the value of that element will be split into text and comment nodes, such as in the following:

<tag>before<!-- Comment -->and after</tag>

//tag returns a value of 'before'

//tag.text()[2] returns a value of 'and after'

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com