title: Find and Edit SubElement in XML using Python ElementTree
body: <p>Because the XML file I'm dealing with has inconsistent subelements I'm having some difficulty finding and editing a specific subelement that doesn't appear in the series of elements until further down the file.
  I'm using Python's ElementTree included with Python 2.7.1.</p>
  
  <p>Here's an example of the type of XML file I'm dealing with:</p>
  
  <pre><code>&lt;?xml vin="1.0" encoding="UTF-8" standalone="yes"?&gt;
  
  &lt;whatever id='Subaru' YouCanDriveMyCar='Wednesday' transmission='stick'&gt;
          &lt;model id='Ford' year='1972'&gt;A&lt;/model&gt;
          &lt;model id='Chevrolet' vin="1234567890" stereo='Alpine' airconditioning='notworking'&gt;Volt&lt;/model&gt;
          &lt;model id='Dodge' vin="3456789012" airconditioning='working'&gt;Durango&lt;/model&gt;
          &lt;model id='Mercedes' vin="4567890123" airconditioning='none'&gt;S150&lt;/model&gt;
          &lt;model id='BMW'&gt;M350&lt;/model&gt;
          &lt;model id='Volkswagen' vin="5678901234" stereo='Sony'&gt;Beetle&lt;/model&gt;
          &lt;model id='Honda' vin="6789012345" airconditioning="blowsicecubes"&gt;Accord&lt;/model&gt;
  &lt;/whatever&gt;
  </code></pre>
  
  <p>In this example, I want to locate model id='Volkswagen' and change stereo='Sony' to 'Blaupunkt'.</p>
  
  <p>If I use ElementTree to search for attribute 'stereo' it errors out because 'stereo' isn't contained in the  elements at the top of the file.</p>
  
  <p>Any help or hints would be greatly appreciated.</p>