OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Images embedded in XML



IMHO, CDATA section is not a good way to hold binary data (because then
you'll never be able to represent three byte sequence '5D 5D 3E' (hexr for
']]>').

To save binary data as part of XML you'll have to use Base64 encoding. I
don't have Java code that illustrates that, but following article might be
useful just to get an idea:
XML and binary data
http://www.PerfectXML.com/articles/xml/binary.asp

Best wishes,
Darshan Singh

-----Original Message-----
From: Seairth Jacobs [mailto:seairth@bbglobex.com]
Sent: Wednesday, April 04, 2001 1:52 PM
To: xml-dev
Subject: Re: Images embedded in XML


Why not use a CDATA section, as in:

    <![CDATA[image binary here]]>

---
Seairth Jacobs
seairth@bbglobex.com

----- Original Message -----
From: "Jeff Rafter" <jeffrafter@earthlink.net>
To: <xml-dev@lists.xml.org>
Sent: Wednesday, April 04, 2001 2:11 PM
Subject: Images embedded in XML


> Does anyone have a Java code sample lying around that takes an image and
> embeds the raw data in an XML document (in Hex, etc...)-- and then is able
> to recreate the image?  I had a friend ask if I could write one up and
> haven't had time to do it.  I know I could simply use a general unparsed
> entity but that is not what he wanted in this case.
>
> Thanks for all of the help!
> Jeff Rafter
>
>
> ------------------------------------------------------------------
> The xml-dev list is sponsored by XML.org, an initiative of OASIS
> <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: xml-dev-request@lists.xml.org
>


------------------------------------------------------------------
The xml-dev list is sponsored by XML.org, an initiative of OASIS
<http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: xml-dev-request@lists.xml.org