The most reasonable way to include binary data in XML documents is to use base64 encoding. JiBX does this for you by default if you have data that's of type byte[] (array of bytes).

This works well for fairly small data sizes. Larger blobs of binary data are best handled by keeping them distinct from the actual XML. In web services this is generally done by using attachments; there's also a new set of W3C recommendations that deal with ways of making the equivalent of attachments available for general XML usage (MTOM and friends).

 - Dennis

Chisholm, Paul wrote:

Hi,

I need to transfer data that includes GIF and PNG images. How would I do
that in JiBX. I realise there is a wider issue since such images contain
bytes that are not valid XML characters. What is the usual way to
include images in XML, and what kind if binding definition is required
to allow marshalling and unmarshalling.

Thanks,
Paul




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to