LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives

XML-L Archives

XML-L Archives


Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font


Join or Leave XML-L
Reply | Post New Message
Search Archives

Subject: Re: Binary data in XML
From: "John E. Simpson" <[log in to unmask]>
Reply-To:General discussion of Extensible Markup Language <[log in to unmask]>
Date:Sun, 18 Feb 2001 18:51:19 -0500

text/plain (25 lines)

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    | me?" -- Steven Wright
XML Q&A:     |

Back to: Top of Message | Previous Page | Main XML-L Page



CataList Email List Search Powered by the LISTSERV Email List Manager