[XML-SIG] XML serialization / marshalling via DTD

Martijn Faassen faassen@vet.uu.nl
Thu, 1 Jun 2000 01:47:50 +0200


george willis wrote:
[snip]
> Does the code in the python SOAP package perform serialization and
> deserialization?  How does this code compare to other ser/deser code found
> used in XMLDocument, XMLWidgets, and ZODB?  It would seem to me that since
> this is needed for ZODB, we might have some good code their?

As far as I'm aware, XMLWidgets doesn't do any serialization or
deserialization. I should know, as I wrote XMLWidgets. :)

(XMLWidgets is a Zope product, by the way, for those listening to
this on the XML-SIG mailing list. It provides user interface system (HTML)
allowing you to attach a HTML user interface and user interface events
to classes of XML nodes.)

ZODB automatically serializes and deserializes arbitrary Python objects
in a transparent fashion, using Python's 'pickle' facility (which I 
suggest you check out if you haven't heard of it yet). In fact, it
does more, offering transparent persistence for Python objects (with
just a few restrictions to support the transaction logic). Since
Zope's XMLDocument is built on top of the ZODB, it automatically gains
its persistence from that. (this applies to both versions of XMLDocument;
both the original version now in use and the new one being developed by
FourThought).

Of course XMLDocument also includes a parser so that you can edit
and upload XML, but the internal format is Python objects.

> Has anyone compared these codebases that must perform the ser/deser to see
> which might have the best code?  Shouldn't we study them and put forth a
> "best-of-breed" ser/deser mechanism that can then be used by all these
> consumers?

In the Zope codebase there is in fact no actual serialization of 
XML specifically. There's just the ZODB's pickle serialization.

Regards,

Martijn