title: Get all Attributes XML in python and Make it into a dictionary
body: <p>XML:</p>
  
  <pre><code>&lt;main&gt;
      &lt;item name="item1" image="a"&gt;&lt;/item&gt;
      &lt;item name="item2" image="b"&gt;&lt;/item&gt;
      &lt;item name="item3" image="c"&gt;&lt;/item&gt;
      &lt;item name="item4" image="d"&gt;&lt;/item&gt;
  &lt;/main&gt;
  </code></pre>
  
  <p>Python:</p>
  
  <pre><code>xmldoc = minidom.parse('blah.xml')
  itemlist = xmldoc.getElementsByTagName('item')
  for item in itemlist :
      #####I want to make a dictionary of each item
  </code></pre>
  
  <p>So I would get</p>
  
  <pre><code>{'name':'item1','image':'a'}
  {'name':'item2','image':'b'}
  {'name':'item3','image':'c'}
  {'name':'item4','image':'d'}
  </code></pre>
  
  <p>Does anyone know how to do this? Is there a function?</p>