Popular recipes by Adam Hupp http://code.activestate.com/recipes/users/117023/2007-04-14T13:47:45-07:00ActiveState Code RecipesSimple maps and lists from XML (Python)
2007-04-14T13:47:45-07:00Adam Hupphttp://code.activestate.com/recipes/users/117023/http://code.activestate.com/recipes/511472-simple-maps-and-lists-from-xml/
<p style="color: grey">
Python
recipe 511472
by <a href="/recipes/users/117023/">Adam Hupp</a>
(<a href="/recipes/tags/xml/">xml</a>).
</p>
<p>There are a several ways to represent collections of key/value pairs in XML, which makes it more difficult than necessary to use that data in python. By taking advantage of common patterns in the XML it is easy to turn most formats into collections of lists and dicts.</p>