title: Parse XML nodes as a list using Python
body: <p>I'm parsing an XML file using DOM in Python. 
  Some of my XML nodes contain a list. </p>
  
  <p>An example looks like this: </p>
  
  <pre><code>&lt;items&gt;
   &lt;item&gt;
      &lt;name&gt;name001&lt;/name&gt;
      &lt;rows&gt;10&lt;/rows&gt;
      &lt;columns&gt;14&lt;/columns&gt;
      &lt;information&gt;
         &lt;i1&gt;[[3, 2]]&lt;/i1&gt;
         &lt;i2&gt;[[6, 13]]&lt;/i2&gt;
         &lt;i3&gt;[[3, 5]]&lt;/i3&gt;
         &lt;i4&gt;[[6, 10], [8, 6]]&lt;/i4&gt;
         &lt;i5&gt;[[6, 12]]&lt;/i5&gt;
      &lt;/information&gt;
   &lt;/item&gt;
   &lt;item&gt;
      &lt;name&gt;name072&lt;/name&gt;
      &lt;rows&gt;10&lt;/rows&gt;
      &lt;columns&gt;13&lt;/columns&gt;
      &lt;information&gt;
         &lt;i1&gt;[[3, 5]]&lt;/i1&gt;
         &lt;i2&gt;[[8, 2]]&lt;/i2&gt;
         &lt;i3&gt;[[6, 6], [8, 11]]&lt;/i3&gt;
         &lt;i4&gt;[[4, 7]]&lt;/i4&gt;
         &lt;i5&gt;[]&lt;/i5&gt;
      &lt;/information&gt;
   &lt;/item&gt;
  &lt;/items&gt;
  </code></pre>
  
  <p>Right now I'm parsing the XML file like this: </p>
  
  <pre><code>dom = parse('file.xml')
  el = dom.documentElement
  allInformation = el.getElementsByTagName('information')
  for information in allInformation:
     for specific in information.childNodes:
        if specific.nodeType == specific.ELEMENT_NODE:
           if specific.nodeName == "i1":
             self.i1 = specific.firstChild.nodeValue
  </code></pre>
  
  <p>Note: i1 is a variable in my file: self.i1 = []
  The output right now for self.i1 is: [[3, 5]]</p>
  
  <p>Now, I'm trying to select i1[0][0], which gives '[' as a result. 
  My i1 is interpreted as a String but I'm trying to interpret it as a list. 
  How could I fix this? </p>
  
  <p>Last but not least, I'm also still searching a way to parse for example only "name072". 
  Now I always parse my entire list and I'm only using the last one.</p>
  
  <p>Edit: I tried to make this clearer. If you still have any suggestions/questions, please tell me. </p>