WebSphere Message Broker, Version 8.0.0.7 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

XML.CDataSection

CData sections in the XML message are represented by a syntax element with field type XML.CdataSection.

The content of the CDataSection element is the value of the CDataSection element without the <![CDATA[ that marks its beginning, and the ]]> that marks its end.

For example, the following CData section:
<![CDATA[<greeting>Hello, world!</greeting>]]>
is represented by a CDataSection element with a string value of:
"<greeting>Hello, world!</greeting>"
Unlike Content, occurrences of <,>, &, ", and ' are not translated to their XML character entities ( &lt;, &gt;, and &amp;) when the CDataSection is produced.

When to use XML.CDataSection

A CData section is often used to embed one XML message within another. By using a CData section, you ensure that the XML reserved characters ( <, >, and & ) are not replaced with XML character entities.

XML.AsisElementContent also allows the production of unmodified character data, but XML.CDataSection is typically a better choice because it protects the outer message from errors in the embedded message.

Parsing the contents of a CDataSection

A common requirement is to parse the contents of a CData section to create a message tree, which you can achieve by using the ESQL statement CREATE with the PARSE clause; see XMLNSC: Working with XML messages and bit streams.
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2016Copyright IBM Corporation 1999, 2016.

        
        Last updated:
        
        Last updated: 2016-05-23 14:46:30


Concept topicConcept topic | Version 8.0.0.7 | ac67245_