title: python minidom - get data from parent nodes with the same name
body: <p>I have an xml file with such structure:</p>
  
  <pre><code>&lt;zone id=1 name=one&gt;
    &lt;subzone&gt;
      &lt;zone id=2 name=subone&gt;
        ...
          &lt;item&gt;
          &lt;item&gt;
          ...
  
  &lt;zone id=1 name=two&gt;
    &lt;subzone&gt;
      &lt;zone id=2 name=subtwo&gt;
        ...
          &lt;item&gt;
          &lt;item&gt;
          ...
  </code></pre>
  
  <p>I want to get a list of all items with an information about their parents. As example - <code>item, zone_id=1, zone_name=two, subzone_id=2, subzone_name=subtwo</code>.
  Amount of <code>zone</code> nodes is differ for group of <code>items</code>. 
  I can get the list of all zones:</p>
  
  <pre><code>def read_region(self, xml):
      doc = minidom.parse(xml)
      node = doc.getElementsByTagName("zone")
      for zone in node:
          print(zone.getAttribute("name"))
  </code></pre>
  
  <p>How can I get data from the specific node if there are a lot of nodes with the same nodename? Or is it possible to get an information about all parent nodes of an element?</p>