Michael Williams wrote: > 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!
You might want to take a look at Fredrik Lundh's ElementTree (and cElementTree) modules: http://effbot.org/zone/element-index.htm -- http://mail.python.org/mailman/listinfo/python-list