This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Embedded document in XML Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Embedded document in XML" Watch "Embedded document in XML" New topic
Author

Embedded document in XML

Tina Shupe
Greenhorn

Joined: Dec 27, 2002
Posts: 7
Is it possible to embed a document into XML? Example… is it possible to take a pdf and embed it into a xml document, and then it can be read back as a pdf document.
We were informed that this is possible?!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12792
    
    5
For binary data, you need to encode it before it can become part of an XML document. Use base64 encoding like SOAP and email attachments but of course it will have to be decoded back to the binary format.
The simplest thing might be to embed a link to the PDF file rather than the bulk file.
Bill
Christian Schnepf
Greenhorn

Joined: Sep 25, 2001
Posts: 28
Is there any recommendations on which base64 encoding api to use to do this with?
 
GeeCON Prague 2014
 
subject: Embedded document in XML