Translate

Wednesday, August 29, 2012

Difference between CDATA and PCDATA in XML ?


PCDATA - Parsed Character Data :
 

XML parsers normally parse all the text in an XML document.
PCDATA is text that will be parsed by a parser. Tags inside the text will be treated as markup and entities will be expanded. 
CDATA - (Unparsed) Character Data :
The term CDATA is used about text data that should not be parsed by the XML parser.Characters like "<" and "&" are illegal in XML elements.
CDATA is text that will NOT be parsed by a parser. Tags inside the text will NOT be treated as markup and entities will not be expanded.

No comments:

Post a Comment