473,387 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Including BINARY data in xml file

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

Jul 20 '05 #1
2 3637
<ka****@kodak.com> wrote in message news:bl**********@news.kodak.com
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
Jul 20 '05 #2
Uzytkownik <ka****@kodak.com> napisal w wiadomosci
news:bl**********@news.kodak.com...
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/in...fc/rfc2045.txt , section 6.8),
or something else (UUENCODE - but it can contain reserved < or even ]]> so
need additional processing to entities).

greetz
Gertas
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: yaipa | last post by:
What would be the common sense way of finding a binary pattern in a ..bin file, say some 200 bytes, and replacing it with an updated pattern of the same length at the same offset? Also, the...
103
by: Steven T. Hatton | last post by:
§27.4.2.1.4 Type ios_base::openmode Says this about the std::ios::binary openmode flag: *binary*: perform input and output in binary mode (as opposed to text mode) And that is basically _all_ it...
8
by: Yeow | last post by:
hello, i was trying to use the fread function on SunOS and ran into some trouble. i made a simple test as follows: i'm trying to read in a binary file (generated from a fortran code) that...
5
by: Neo | last post by:
Hello: I am receiving a Binary File in a Request from a application. The stream which comes to me has the boundary (Something like "---------------------------39<WBR>­0C0F3E0099" without the...
4
by: knapak | last post by:
Hello I'm a self instructed amateur attempting to read a huge file from disk... so bear with me please... I just learned that reading a file in binary is faster than text. So I wrote the...
7
by: John Dann | last post by:
I'm trying to read some binary data from a file created by another program. I know the binary file format but can't change or control the format. The binary data is organised such that it should...
4
by: jesuraj | last post by:
Hi, how can i read input from a data file which contains binary or hex values. I have to use the exact binary data for further processing.only limited number of bits are taken form the file(64...
1
by: willakawill | last post by:
I have a very large binary file saved from a vb array with 2 dimensions; Dim arMatrix() As Byte Dim fNum As Integer ReDim arMatrix(7166, 17769) 'code here to store data from a database into...
15
by: JoeC | last post by:
I am writing a program that I am trying to learn and save binary files. This is the page I found as a source: http://www.angelfire.com/country/aldev0/cpphowto/cpp_BinaryFileIO.html I have...
13
by: sachin | last post by:
Hi, Is it possible to do something like this: unsigned char arr = { #include "cFile.c" } I need that C source file cFile.c to compile and its binary output to include in array.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.