Including BINARY data in xml file

K

katiki

Hi all,

I suppose it's a frequent post, but I would like to include a binary data
(iomage in fact)
into xml files (generated by our application).
Custiomer does not want the image to be an external files
I'm using xerces c++ toolkit, I know there are some usefull classes to
achieve that, but I've no
sample code at all !

Thanks to help me,

Karim
 
M

Martin Boehm

I suppose it's a frequent post, but I would like to include a binary
data (iomage in fact) into xml files (generated by our application).
Custiomer does not want the image to be an external files
I'm using xerces c++ toolkit, I know there are some usefull classes to
achieve that, but I've no sample code at all !

I suppose you want to transform your XML to HTML in some way or other.

Given you can process your XML file with ASP (just for example):
You cold encode your Image bytewise, maybe as a comma separated list of
bytes and put that into your XML. Then you can create an array of bytes
from that in ASP and implemet a function that puts these bytes into the
output stream on request (e.g. <img src="img.asp&amp;image=img1"/>)

I don't think there is a way to put the image source into the XML and
transform that directly into HTML _with_ the image visible.

Martin
 
G

Gertas

Uzytkownik said:
Hi all,

I suppose it's a frequent post, but I would like to include a binary data
(iomage in fact)
into xml files (generated by our application).
Custiomer does not want the image to be an external files
I'm using xerces c++ toolkit, I know there are some usefull classes to
achieve that, but I've no
sample code at all !


You can encode image data using Base64 (
http://src.doc.ic.ac.uk/computing/internet/rfc/rfc2045.txt , section 6.8),
or something else (UUENCODE - but it can contain reserved < or even ]]> so
need additional processing to entities).

greetz
Gertas
 

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,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top