Click to See Complete Forum and Search --> : embedding graphics in XML document


sharma-kapil
September 11th, 2000, 06:50 PM
hi,
We provide a link to a picture file(jpg, gif etc) in the xml/html document and can use style sheet(for xml) to display the picture data in browser window. Is there a new technology coming(like SVG etc) which allows to somehow represent the picture data in document itself so that I need not worry about the loss or deletion of images.

~ regards
~ kapil

~ ks

Simon666
November 6th, 2001, 08:58 AM
Hello,

my brother is oner of the poor bastards who has to develop a new standard for embedding multimedia like MPEG-21 in xml as thesisstudent. I heard from him that there is no standard yet for multimedia for xml. Don't rely on him either: he's probably not going to succeed on his thesis.

Sinisha Ristich
November 13th, 2001, 03:13 AM
Hi,

I know only one part of the problem and I'm looking for the solution of other.

You can write/read the binary data to/from xml node using the "base64" coding. So there is a way to dump your image data from the memory to xml and later to read it back. It's the same that MIME does with the multimedia files that you send via e-mail. I'm working this with msxml parser in visual c++ and it looks like this:

CComPtr<IXMLDOMElement> pElement;
pDocument->createElement(CComBSTR("IMAGE_DATA"),&pElement);
.
.
.
CComBSTR bNodeType("bin.base64");
pElement->put_NodeType(bNodeType);
pElement->put_nodeTypedValue( /* here you put the variant representation of your data, probably the safearray*/);
.
.
.
// the same is for reading
VARIANT varget;
VariantInit(&varget);
pElement->get_nodeTypedValue(&varget);
SAFEARRAY *parr;
parr = V_ARRAY(&varget);
BYTE *imdata = (BYTE *) parr->pvData; // and so on
.
.
.




My problem is to find an easy solution (XSL, XSLT?) to make the internet explorer show these data as the images. I write a program that will do it but I need a solution that could work on every pc with the support of maybe one xsl or similar file.

I hope it helps

Sinisha Ristich
November 13th, 2001, 03:13 AM
Hi,

I know only one part of the problem and I'm looking for the solution of other.

You can write/read the binary data to/from xml node using the "base64" coding. So there is a way to dump your image data from the memory to xml and later to read it back. It's the same that MIME does with the multimedia files that you send via e-mail. I'm working this with msxml parser in visual c++ and it looks like this:

CComPtr<IXMLDOMElement> pElement;
pDocument->createElement(CComBSTR("IMAGE_DATA"),&pElement);
.
.
.
CComBSTR bNodeType("bin.base64");
pElement->put_NodeType(bNodeType);
pElement->put_nodeTypedValue( /* here you put the variant representation of your data, probably the safearray*/);
.
.
.
// the same is for reading
VARIANT varget;
VariantInit(&varget);
pElement->get_nodeTypedValue(&varget);
SAFEARRAY *parr;
parr = V_ARRAY(&varget);
BYTE *imdata = (BYTE *) parr->pvData; // and so on
.
.
.




My problem is to find an easy solution (XSL, XSLT?) to make the internet explorer show these data as the images. I write a program that will do it but I need a solution that could work on every pc with the support of maybe one xsl or similar file.

I hope it helps