Difference between CDATA and PCDATA in XML ?

Answer Posted / sundaram

PCDATA – parsed character data. It parse/navigates to all
the data/text in an xml document.
Eg:
<name>
<first>prem</first>
<last>kumar</last>
</name>
Here, the name element contains 2 more
elements “first”,”last”. So it parse further to get the
data/text of first and last to give the value of name
as “premkumar”

CDATA – unparsed characted Data. This is the data that
should not be parsed further in an xml document.
<name>
<![CDATA[
<first>prem</first>
<last>kumar</last>
]]>
</name>
Here, the value of name will be
<first>prem</first><last>kumar</last>.

Thanks
sundaram80@rediffmail.com

Is This Answer Correct ?    80 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How important is an element’s attributes used in xslt?

449


What is rss feed outlook?

440


If xml does not have closing tag will it work ?

494


What are the ways to use namespaces?

477


What are the types of nodes in the xpath data model? Explain briefly.

485






What is the difference between csv and xml?

453


What is difference between xsd and xml?

462


Are atom feed files xml documents?

494


How is xml used?

447


Does it cost money to host a podcast?

443


How do I create an xml map in excel?

436


What is provided by the elements that don’t recognize the namespace uri?

461


How do I convert pdf to docx?

433


What are the different scenarios under which an xml schema may be used?

465


Explain about xml canonicalization?

507