Module for converting XML to Python object(s)?

Uche Ogbuji uche at ogbuji.net
Mon Aug 9 10:22:14 EDT 2004
"Robert Oschler" <no_replies at fake_email_address.invalid> wrote in message news:<otdPc.224$df.27 at bignews5.bellsouth.net>...
> Has anybody seen a Python module that will take an XML document (not a
> colossal one), and convert it to a Python nested class object?  I'm
> basically looking for something that would allow me to parse an XML document
> (not tokenize it like SAX or make it into an XPath accessible DOM object
> like others), directly into a nested Python object so I could access
> everything through Python class attribute references.

There is a metric ton of these "data bindings".  See:

http://www.xml.com/pub/a/2003/06/11/py-xml.html
http://www.xml.com/pub/a/2003/07/02/py-xml.html
http://www.xml.com/pub/a/2003/08/13/py-xml.html
http://www.xml.com/pub/a/2003/12/17/py-xml.html

Based on your description, your best bets are generate_ds, gnosis
objectify, xmltramp and Anobind.

Good luck, and do report back on your experiences.


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Perspective on XML: Steady steps spell success with Google -
http://www.adtmag.com/article.asp?id=9663
Use XML namespaces with care -
http://www-106.ibm.com/developerworks/xml/library/x-namcar.html
Managing XML libraries - http://www.adtmag.com/article.asp?id=9160
Commentary on "Objects. Encapsulation. XML?" -
http://www.adtmag.com/article.asp?id=9090
Harold's Effective XML -
http://www.ibm.com/developerworks/xml/library/x-think25.html
A survey of XML standards -
http://www-106.ibm.com/developerworks/xml/library/x-stand4/



More information about the Python-list mailing list