deprecated/buildtools/buildsystemtools/lib/XML/DOM/CDATASection.pod
author lorewang
Thu, 11 Nov 2010 11:26:32 +0800
changeset 677 44e49837144a
parent 655 3f65fd25dfd4
permissions -rw-r--r--
update release info
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
655
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     1
=head1 NAME
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     2
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     3
XML::DOM::CDATASection - Escaping XML text blocks in XML::DOM
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     4
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     5
=head1 DESCRIPTION
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     6
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     7
XML::DOM::CDATASection extends L<XML::DOM::CharacterData> which extends
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     8
L<XML::DOM::Node>.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     9
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    10
CDATA sections are used to escape blocks of text containing characters
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    11
that would otherwise be regarded as markup. The only delimiter that is
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    12
recognized in a CDATA section is the "]]>" string that ends the CDATA
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    13
section. CDATA sections can not be nested. The primary purpose is for
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    14
including material such as XML fragments, without needing to escape all
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    15
the delimiters.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    16
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    17
The DOMString attribute of the Text node holds the text that is
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    18
contained by the CDATA section. Note that this may contain characters
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    19
that need to be escaped outside of CDATA sections and that, depending
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    20
on the character encoding ("charset") chosen for serialization, it may
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    21
be impossible to write out some characters as part of a CDATA section.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    22
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    23
The CDATASection interface inherits the CharacterData interface through
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    24
the Text interface. Adjacent CDATASections nodes are not merged by use
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    25
of the Element.normalize() method.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    26
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    27
B<NOTE:> XML::DOM::Parser and XML::DOM::ValParser convert all CDATASections 
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    28
to regular text by default.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    29
To preserve CDATASections, set the parser option KeepCDATA to 1.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    30
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    31