I thank Uche for doing an excellent job covering my library--heck,
probably better than I've done writing about it myself.
I want to let interested readers know that I am experimenting with
retaining complete sequence information in gnosis.xml.objectify (Uche's
spam/eggs example shows where I lose structural information). The
motivation is simply that I am working on a little project where I need
it myself. So look forward to that, in what will probably be called
Gnosis Utilities 1.1. But I haven't yet finalized the interface for
this extra information (probably it will be accessed wholly with utility
functions, since I do not want to pollute the namespace of a "py_obj"
with anything that could conflict with a child tagname in the XML).
One reason I have held off on doing this is that I still don't feel
comfortable with automating re-serialization. There's a slippery slope
between the one thing and the other. Since my objects are so
"close-to-the-metal" Pythonic constructs, you can do a lot of flexible
things with them. More so than those in ElementTree, PyRXP, or
generateDS. The drawback is that many of those flexible things produce
objects that have no obvious or straightforward serialization to XML.
I've resisted the temptation to guess too much on what users want for a
serialization in fuzzy cases.
Of course, another issue is that I want to keep the EXPAT version of the
parser very memory-friendly. Adding too much metadata about what
objects are doing weakens that goal. DOM is obese from the start, so I
don't care about it for users of the (default) DOM parser in
gnosis.xml.objectify.
David Mertz
|