[lxml-dev] Issues with objectify.ObjectifiedElement: assignment, attribute handling, and documentation

Stefan Behnel stefan_ml at behnel.de
Mon Oct 8 23:13:22 CEST 2007


Michael Pechal wrote:
> Phase one involves translating everything into XML (currently custom
> data classes with cPickling).

Doesn't tostring() or ElementTree(root).write() do what you want? I don't see
why you would go through pickling here...

http://effbot.org/elementtree/elementtree-elementtree.htm


> Phase two entails developing an XSD file to validate the XML.

Unless you are very firm with XML Schema and/or have good tool support, I
generally suggest writing a RelaxNG schema instead (preferably in the "compact
syntax" aka RNC), which is easy to write, read and understand and is well
supported by lxml/libxml2. It also supports the XSD datatypes and can be
translated into an XML Schema via tools like trang.

Stefan



More information about the lxml-dev mailing list