Creating referenceable objects from XML

Michael Williams mwilliams at mgreg.com
Sun Dec 4 23:16:58 EST 2005


Hi All,

I'm looking for a quality Python XML implementation.  All of the DOM  
and SAX implementations I've come across so far are rather  
convoluted.  Are there any quality implementations that will (after  
parsing the XML) return an object that is accessible by name? Such as  
the following:




xml = """
<book>
	<title>MyBook</title>
	<author>the author</author>
</book>
"""





And after parsing the XML allow me to access it as so:

book.title

I need it to somehow convert my XML to intuitively referenceable  
object.  Any ideas?  I could even do it myself if I knew the  
mechanism by which python classes do this (create variables on the fly).

Thanks in advance!



More information about the Python-list mailing list