xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Shacklette <jmsh...@home.com>
Subject Re: question about embedded data in XML
Date Fri, 03 Nov 2000 17:12:28 GMT
Thanks Andy for the info.

This means that within XML, there is NO WAY WHATEVER to embed XML within
an XML document, right?  What if the "embedded" XML were encoded, might
that work?  Any other ideas for workarounds?

What we're trying to do is use XML for our file format.  HOWEVER, any given
file (which represents an "object") might very well itself contain XML (say,
one of the "string" variables in the object itself contained some XML), which
is why we need the ability to "embed" XML in an XML document.  I was hoping the
CDATA section might be the solution, apparently it is not.

Any other ideas?

Thanks for all info and help.


> Mark Shacklette wrote:
> > 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 idea...):
> > 
> > <foo><! [CDATA[<embeddedXML><! [CDATA[hello]]></embeddedXML>]]></foo>
> 
> This has acouple problems:
> 
> 1) You aren't allowed a space between "<!" and "[CDATA[". 
>    (XML spec 2.7 [19])
> 2) CDATA (and character content, for that matter) cannot contain 
>    the "]]>" sequence. Which means that you cannot embed CDATA 
>    sections within each other. (XML spec 2.4 [14], 2.7 [20])
> 
> -- 
> Andy Clark * IBM, JTC - Silicon Valley * andyc@apache.org
> 
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
> 


Mime
View raw message