Click to See Complete Forum and Search --> : Binary data in a XML file?


Jim Bassett
December 14th, 2000, 01:51 PM
Is it possible to send binary data or a binary file inside a XML document such as a gif or jpg file?

jgauntz
December 18th, 2000, 10:59 AM
Yes it is possible. To do this you must Base64 encode the binary data, and then you will need to Base64 decode the data to get the binary data back. Basically Base64 encoding takes binary data and converts it to printable chararctes. These printable characters can then be written to the XML.

Jim Bassett
December 18th, 2000, 03:22 PM
Thanks. I guess this sounds stupid but I cannot find a means to decode the base64 XML segment in a browser. Is there a scripting that allows this? Do you ahve examples, both server and client side?

thanks

Jim Bassett