Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Store a binary column in XML

Reply
Thread Tools

Store a binary column in XML

 
 
Stoggers
Guest
Posts: n/a
 
      07-22-2005
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.

 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      07-22-2005


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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
 
 
 
Stoggers
Guest
Posts: n/a
 
      07-22-2005
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to store/retrieve binary data in/from SQL server DB? =?Utf-8?B?ZGF2aWQ=?= ASP .Net 4 07-07-2006 04:50 PM
How do I store my objects? XML/binary/schema timasmith@hotmail.com Java 3 02-25-2006 02:25 AM
store Images (or any Binary Data) to a SQL Server database using VC++ Universal C++ 1 04-08-2005 10:23 AM
store Images (or any Binary Data) to a SQL Server database using VC++ Universal C++ 0 04-08-2005 10:01 AM
to store or not to store an image =?Utf-8?B?UnVkeQ==?= ASP .Net 6 03-30-2005 05:51 AM



Advertisments