At 10:20 AM 02/19/2001 +1100, Tom Harris wrote:
>I am toying with using XML to mark up the meta-data for a large binary data
>object. However our requirements are for the large binary data (8M!) to live
>in the same file as the XML. Is there any way to tell the XML parser to give
>up on parsing when it reads some symbol (like Perl does when it reads
>__END__)? No I can't just put the data in a CDATA section, firstly it may
>well contain the ]]> code to close it, and secondly the data is only
>required as a stream, not loaded up all at once.
>How is representing true arbitrary data done in XML?
Your only option is to do something like base64 encoding of the binary data
to text, which then requires decoding on the other end. XML documents by
definition cannot hold arbitrary binary data, and for that reason the
"requirement" to keep binary data in the same file as the XML itself is
really, umm, a fantasy. :)
It might be possible to do something with a DBMS, e.g. Oracle, capable of
storing BLOBs and at the same time manipulating XML. But no matter how you
slice it, if it's XML it won't contain binary stuff.
John E. Simpson | "Is it weird in here, or is it just
http://www.flixml.org | me?" -- Steven Wright
XML Q&A: www.xml.com |