Store a binary column in XML

S

Stoggers

Hi,

I have the following requirement:

Extract binary data from column in RDBMS and store in XML.

Process document using XSLT, retaining binary data - ie if x'00 was in
the column then x'00 should be output by XSLT.

Question - what is the best representation in XML for this data?

Example of how to encode and/or transform would be appreciated.

Thanks,

Mike.
 
M

Martin Honnen

Stoggers wrote:

I have the following requirement:

Extract binary data from column in RDBMS and store in XML.

Process document using XSLT, retaining binary data - ie if x'00 was in
the column then x'00 should be output by XSLT.

XML does not allow the unicode character with codepoint 0 so you can't
have that character in your XML or output it with XSLT.
Question - what is the best representation in XML for this data?

You could base64 encode the binary data, that is a format XML can then
store.
 
S

Stoggers

Hi,

Many thanks for the prompt response.

I had seen some references to base64 - do you have an example or can
you point me to an example where it has been used to store binary
data?

Also, is there some processing in XSLT that would convert back to
binary? The output type would be text so I can't see a problem with
having embedded binary data.

Thanks,

Mike.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top