Python code from XMLSchema?

Dave Kuhlman dkuhlman at
Fri Jul 2 17:47:32 CEST 2004

Russell Lear wrote:

> I need to be able to unmarshall data from an XML file into
> (instances of)
> appropriate Python classes .  I don't have control over the schema
> used.
> I'd like the Python classes to use lists for elements whose
> XMLSchema spec has maxOccurs > 1, simple attributes for maxOccurs
> = minOccurs = 1, dict for element attributes, etc.

Here are links to two different solutions: and
xml_objectify.  One is shameless self-promotion; you will have to
figure out which.

And, here is a document that compares the above two approaches:

And, if you are considering the use of XSLT, you may also be
interested in the following document, which describes the use of as an alternative to XSLT:



Dave Kuhlman

More information about the Python-list mailing list