Ebbeding image data in XML

"Werner F. Bruhin" <[email protected]>
Newsgroups gmane.comp.python.xml
Message-ID <[email protected]>
I would like to embed an image in an XML file.

I was thinking of using PIL.tostring() and put it into the imageasstring 
element.

<imagedata>
    <imagemode>RGB</imagemode>
    <imagesize>(540, 982)</imagesize>
    <imageasstring>HERE GOES IMAGE DATA</imageasstring>
</imagedata>

Currently I use lxml.etree and get encoding errors when I write the 
image into the element.

I would like the file to XML Schema complient, so what "xs:" type should 
one use for the imageasstring element?

Any hints as always much appreciated.
Werner


_______________________________________________
XML-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/xml-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.