What is the difference between #PCDATA
and #CDATA
in DTD?
PCDATA – parsed character data. It parses all the data in an XML document.
Example:
mom
dad
Here, the
element contains 2 more elements:
and
. So it parses further to get the text of mother and father to give the text value of family as “mom dad”
CDATA – unparsed character Data. This is the data that should not be parsed further in an xml document.
mom
dad
]]>
Here, the text value of family will be
.