DESCRIPTION

XML::DOM::CDATASection extends XML::DOM::CharacterData which extends XML::DOM::Node.

\s-1CDATA\s0 sections are used to escape blocks of text containing characters that would otherwise be regarded as markup. The only delimiter that is recognized in a \s-1CDATA\s0 section is the \*(L"]]>\*(R" string that ends the \s-1CDATA\s0 section. \s-1CDATA\s0 sections can not be nested. The primary purpose is for including material such as \s-1XML\s0 fragments, without needing to escape all the delimiters.

The DOMString attribute of the Text node holds the text that is contained by the \s-1CDATA\s0 section. Note that this may contain characters that need to be escaped outside of \s-1CDATA\s0 sections and that, depending on the character encoding (\*(L"charset\*(R") chosen for serialization, it may be impossible to write out some characters as part of a \s-1CDATA\s0 section.

The CDATASection interface inherits the CharacterData interface through the Text interface. Adjacent CDATASections nodes are not merged by use of the Element.normalize() method.

\s-1NOTE:\s0 XML::DOM::Parser and XML::DOM::ValParser convert all CDATASections to regular text by default. To preserve CDATASections, set the parser option KeepCDATA to 1.