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 do I convert a pdf to a zip file?

457


How can name conflicts be avoided in xml?

473


What are the types of web services?

448


Can I encode mathematics using xml?updated

500


Can we use css in xml?

459






Is xml is a programming language?

490


Can I resolve the uri used as an xml namespace name?

456


Explain the working of xslt?

574


What happens if there is no prefix on an element type name?

488


What are rss feeds and how do I use them?

404


What is a file feed?

452


What is the difference between xsl and dsssl?

567


How do I convert pdf to xml?

458


What is the role of xsl transformer?

532


What is the difference between xsl and xslt?

479