[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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@b...] 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@b... ----- Original Message ----- From: "Jeff Rafter" <jeffrafter@e...> To: <xml-dev@l...> 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@l... > ------------------------------------------------------------------ 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@l...
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|