title: xml to Python data structure using lxml
body: <p>How can I convert xml to Python data structure using lxml?</p>
  
  <p>I have searched high and low but can't find anything.</p>
  
  <p>Input example</p>
  
  <pre><code>&lt;ApplicationPack&gt;
    &lt;name&gt;Mozilla Firefox&lt;/name&gt;
    &lt;shortname&gt;firefox&lt;/shortname&gt;
    &lt;description&gt;Leading Open Source internet browser.&lt;/description&gt;
    &lt;version&gt;3.6.3-1&lt;/version&gt;
    &lt;license name="Firefox EULA"&gt;http://www.mozilla.com/en-US/legal/eula/firefox-en.html&lt;/license&gt;
    &lt;ms-license&gt;False&lt;/ms-license&gt;
    &lt;vendor&gt;Mozilla Foundation&lt;/vendor&gt;
    &lt;homepage&gt;http://www.mozilla.org/firefox&lt;/homepage&gt;
    &lt;icon&gt;resources/firefox.png&lt;/icon&gt;
    &lt;download&gt;http://download.mozilla.org/?product=firefox-3.6.3&amp;amp;os=win&amp;amp;lang=en-GB&lt;/download&gt;
    &lt;crack required="0"/&gt;
    &lt;install&gt;scripts/install.sh&lt;/install&gt;
    &lt;postinstall name="Clean Up"&gt;&lt;/postinstall&gt;
    &lt;run&gt;C:\\Program Files\\Mozilla Firefox\\firefox.exe&lt;/run&gt;
    &lt;uninstall&gt;c:\\Program Files\\Mozilla Firefox\\uninstall\\helper.exe /S&lt;/uninstall&gt;
    &lt;requires name="autohotkey" /&gt;
  &lt;/ApplicationPack&gt;
  </code></pre>