This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Embedded document in XML" Watch "Embedded document in XML" New topic

Embedded document in XML

Tina Shupe

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

Joined: Mar 22, 2000
Posts: 12761
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.
Christian Schnepf

Joined: Sep 25, 2001
Posts: 28
Is there any recommendations on which base64 encoding api to use to do this with?
jQuery in Action, 2nd edition
subject: Embedded document in XML
Similar Threads
Binary Data in XML
javascript for PDF
can we pass object in XML file(urgent)
Need a java code for convert PDF to Word document as well as Word document to XML. Is this possible
Reporting with embedded video -> pdf