title: convert xml to python dict
body: <p>I'm trying to make a dict class to process an xml but get stuck, I really run out of ideas. If someone could guide on this subject would be great.</p>
  
  <p>code developed so far:</p>
  
  <pre><code>class XMLResponse(dict):
      def __init__(self, xml):
          self.result = True
          self.message = ''
          pass
  
      def __setattr__(self, name, val):
          self[name] = val
  
      def __getattr__(self, name):
          if name in self:
              return self[name]
          return None
  
  message="&lt;?xml version="1.0"?&gt;&lt;note&gt;&lt;to&gt;Tove&lt;/to&gt;&lt;from&gt;Jani&lt;/from&gt;&lt;heading&gt;Reminder&lt;/heading&gt;&lt;body&gt;Don't forget me this weekend!&lt;/body&gt;&lt;/note&gt;"
  XMLResponse(message)
  </code></pre>