xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas B. Passin" <tpas...@mitretek.org>
Subject Re: question about embedded data in XML
Date Fri, 03 Nov 2000 21:11:56 GMT
Mark Shacklette asked

> And this is I suppose the question, because what happens in the case
that THAT
> CDATA section itself includes XML, and to really get at it, what if
> enclosed XML itself includes multiple CDATA section.  Which CDATA
closure will
> operate?  Or am I missing something?
> the point is this:  Will Xerces parsers correctly work with something
like the
> following (pardon if it's not exacly correct, but you get the
> <foo><! [CDATA[<embeddedXML><! [CDATA[hello]]></embeddedXML>]]></foo>
>                                ^^^^^^^^^^^^^^
You can have any legal xml characters in a CDATA section except for the
token that denotes the end of one.  To include them, you'd have to
escape them with an entity or a character reference.

But there is a trick - you can split the delimiter characters between
two adjacent CDATA sections, then it works.  This means you have to do
some pre and post processing to get what you want, but it's not much

Tom Passin

View raw message