Am Wed, 16 Mar 2005 14:19:49 -0800 schrieb [EMAIL PROTECTED]: > I've been searching high and low for a way to simply convert a small > XML configuration file to Python data structures. I came across gnosis > XML tools, but need a built-in option for doing something similar. > > My knowledge of DOM and anything beyond simple XML structures is > rudimentary at best. Is there a simple way to use SAX handlers to pull > attributes and elements into Python lists/dictionaries?
Hi, Just write a script which uses xml.sax. It is not difficult. You get an event for every start-tag and for every end-tag. The class which handles the events can build the structure if your XML file. The online version of the python cookbook has some python and SAX examples, Thomas -- Thomas Güttler, http://www.thomas-guettler.de/ -- http://mail.python.org/mailman/listinfo/python-list