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
How do I open an xml file in notepad ++?
What is Extensible Markup Language?
Can we do sorting in XSL ? how do you deal sorting columns dynamically in XML.
Why should we go for xml editor instead of notepad?
What is xpointer in xml?
Does the scope of an xml namespace declaration include the element it is declared on?
Do I have to know html or sgml before I learn xml?
Why rss feed is important?
Is wsdl and xsd same?
How does stylesheet effects the overall template?
What is the difference between versions 1.0 and 1.1 of the xml namspaces recommendation?
How do I subscribe to rss feeds?
What is dom? What is it used for?
What is excel xml map?
what is XLink and XPointer ?