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

What is difference between xsd and wsdl?

610


What is DiffGram in XML?

691


What is xml testing?

629


What is xml parser function?

631


How do I view xsd files?

584






If I start using xml namespaces, do I need to change my existing dtds?

637


Do you feel that you are a good XSLT programmer?

669


What is the difference between xsl and xslt?

640


Why xsl is used in xml?

630


How do I convert excel to xml?

613


How do start a podcast?

601


What is the use of xsd in xml?

650


Why is xml preferred over html?

688


Is wsdl and xsd same?

631


What is XML Namespace?

635