Search code examples
xmldtd

Difference between PCDATA and CDATA in DTD


What is the difference between #PCDATA and #CDATA in DTD?


Solution

  • PCDATA - Parsed Character Data

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

    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.