xml_to_dict

sunpy.util.xml.xml_to_dict(xmlstring)[source] [edit on github]

Converts an XML string to a Python dictionary

Warning

This method does not support multiple inner nodes of the same name but with different values. It always takes the last value.

Examples

<outer>
    <inner>one</inner>
    <inner>two</inner>
</outer>

gives you the dict:

{u'outer': {u'inner': u'two'}}