[Expat-discuss] How can I add a function to skip a
setnumber of bytes
Fred L. Drake, Jr.
fdrake@acm.org
Wed Sep 5 08:45:03 2001
Joe Wiemann writes:
> The requirement is to have embedded graphics in a xml type file
> format.. this file format does not have to follow the exact rules
> of xml..
> we just want the file format to be easy to follow and somewhat
> readable by human eyes....
[from a different message...]
> I know this is not following XML -- but I think I can get it to work -> I do
> not want the overhead of doing mime encoding or anything like that.
I'd suggest using some form of binary-to-text encoding anyway. It
does not add enough overhead to make a real difference, and you should
be able to write very efficient encoder/decoder functions. If you
want, you could probably borrow code from Python. Take a look at the
Modules/binascii.c file in the Python source distribution for basic
encoding/decoding functions for uu-encoding, base64, and Mac hqx
encoding.
If you want something that isn't XML, I'd suggest using something
that's obviously not XML so maintainers don't get confused down the
road. Perhaps use a package format like a ZIP or JAR, and include
your XML and images there, with references from the XML to the
images.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
PythonLabs at Zope Corporation