In a python method, I want to convert a XML string into a dictionary...
Hi all, I would like to create a python method which take a parameter xml_string and return a dictionary containing all tags, values and attributes. I know that it exists some modules for xml conversions but I don't know very much how to use them. I am novice in Python so it's a little bite difficult for me to understand the codes... Thanks Fred
0. There is an XML parser in the python standard library (package xmllib, you find it in the python documentation), there also exist alternative xml parsers. 1. Take a look at www.xml-rpc.com, you find a lot of iternnformation there. 2. check out the xmlrpclib by Frederic Lundh (it comes also with Zope, look in the lib/python/xmlrpclib.h) 3. in the xmlrpclib.py you can see how the xml parser is used 4. there are several how-to's at zope.org concerning xml-rpc - just serch zope.org for 'xmlrpc' good luck phil *********** REPLY SEPARATOR *********** On 05.10.2000 at 10:52 Frederic Quin wrote:
Hi all,
I would like to create a python method which take a parameter xml_string and return a dictionary containing all tags, values and attributes. I know that it exists some modules for xml conversions but I don't know very much how to use them. I am novice in Python so it's a little bite difficult for me to understand the codes...
Thanks
Fred
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Frederic Quin -
Philipp Auersperg