xsd, data binding. Modern approach?

Stefan Behnel stefan_ml at behnel.de
Fri Feb 29 07:01:29 EST 2008


Vladimir Kropylev wrote:
> What is the most actual approach to python XML data-binding?
> The answers given by google seam to be rather outdated. Can't believe
> nothing's changed since 2003.
> 
> To be concrete, i've faced the following task:
> I HAVE:
> - XSD schema (a huge collection of *.xsd files)
> TODO:
> - create python classes corresponding to the given schema
> - create, serialize/deserialize (to/from XML) python objects of these
> classes (according to the given schema)

If you don't insist on generating code, lxml.objectify might do what you want.

http://codespeak.net/lxml/objectify.html
http://codespeak.net/lxml/objectify.html#asserting-a-schema

Stefan



More information about the Python-list mailing list