I read an XML file (from a client) with CDATA sections in it. I needed to
replace the CDATA sections with some other text but in the process the CDATA
prefix (and the ending suffix ]]>) were removed. It could be because the
text within CDATA didn't carry any symbols such as < or >. But the clients
may not be happy since they may perceive this to be a "corruption" from our
end. But that may not be a problem if they are knowledgeable about the
reason for CDATA. That is the reason I need to know whether some text is
CDATA or not.
When is a node a CDATA_SECTION_NODE in the Node interface? Thanks.
> -----Original Message-----
> From: Lars Marius Garshol [mailto:[log in to unmask]]
> Sent: Thursday, January 18, 2001 8:59 AM
> To: [log in to unmask]
> Subject: Re: CDATA section in XML
> * Sujatha Marsden
> | I am trying to identify CDATA sections with an XML document and I am
> | not getting anywhere.
> The distinction between character data represented as CDATA sections
> and ordinary character data is not a part of the XML data model. In
> other words, tools are not required to tell you about this, and it is
> in general considered a bad idea to let applications depend on this.
> So the question really becomes: why do you want to do this?
> --Lars M.