January 28, 2010

1 XML CDATA

All text in an XML document will be parsed by the parser.

Only text inside a CDATA section will be ignored by the parser.

Parsed Data

XML parser normally parse all the text in an XML document.

When an XML element is parsed, the text between the XML tags is also parsed.

<message>This text is also parsed</message>

The parser does this because XML elements can contain other elements, as in this examples,
where the <name> element contains two other elements (first and last):

<name><first>Bill</first><last>Gates</last></name>

and the parser will break it up into sub-elements like this:

<name>

<first>Bill</first>
<last>Gates</last>
</name>

1 comments:

Anonymous said...

If you are using SAX or DOM, you may also want to investigate vtd-xml

http://vtd-xml.sf.net

Post a Comment

Blogger Themes

 
Powered by Blogger