[jdom-interest] Qe: Binary data in XML

Ken Rune Helland kenh at csc.no
Wed May 30 03:45:36 PDT 2001

At 12:17 PM 5/30/2001 +0200, Martin Gerlach wrote:

>Is it possible to store binary data in a XML Document, maybe
>CDATA-Section or something else? Or is this not allowed at...
>I don't mean a reference to binary files, i mean binary data
>itself to store in a XML-File.
>Thanks in advance for any reply ...

I think you best option is to use someting like
base64 encoding of the binary data, since base64
doesent use any of the XML spesific caracters you
dont even need to use CDATA. and it works even with
7-bit ASCII files/transmission.

The backside is that the data will take 1/3 more
space and the computing time to encode and decode
the data.


More information about the jdom-interest mailing list