title: Parsing nested xml with lxml and Python
body: <p>I am having trouble parsing XML when it is in the form of:</p>
  
  <pre><code>&lt;Cars&gt;
      &lt;Car&gt;
          &lt;Color&gt;Blue&lt;/Color&gt;
          &lt;Make&gt;Ford&lt;/Make&gt;
          &lt;Model&gt;Mustant&lt;/Model&gt;
      &lt;/Car&gt;
      &lt;Car&gt;
          &lt;Color&gt;Red&lt;/Color&gt;
          &lt;Make&gt;Chevy&lt;/Make&gt;
          &lt;Model&gt;Camaro&lt;/Model&gt;
      &lt;/Car&gt;
  &lt;/Cars&gt;
  </code></pre>
  
  <p>I have figured out how to parse 1st level children like this:</p>
  
  <pre><code>&lt;Car&gt;
      &lt;Color&gt;Blue&lt;/Color&gt;
      &lt;Make&gt;Chevy&lt;/Make&gt;
      &lt;Model&gt;Camaro&lt;/Model&gt;
  &lt;/Car&gt;
  </code></pre>
  
  <p>With this kind of code:</p>
  
  <pre><code>from lxml import etree
      a = os.path.join(localPath,file)
      element = etree.parse(a)
      cars = element.xpath('//Root/Foo/Bar/Car/node()[text()]')
      parsedCars = [{field.tag: field.text for field in cars} for action in cars]
      print parsedCars[0]['Make'] #Chevy
  </code></pre>
  
  <p>How can I parse our multiple "Car" tags that is a child tag of "Cars"?</p>