title: ParseError parsing empty valued xml doc
body: <p>There are lots of articles pertaining to parsing xml with elementtree. I've gone through a bunch of them and read through the docs but I can't come up with a solution that works for me. I'm trying to supplement info thats created by another app in a nfo file but i need to preserve the conventions in the file.</p>
  
  <p>Here is an example of how the file is laid out</p>
  
  <pre><code>&lt;title&gt;
    &lt;name&gt;Test Name&lt;/name&gt;
    &lt;alt name /&gt;
    &lt;file local="C:\file\file1.doc" type="word"&gt;http://filestore/file1.doc&lt;/file&gt;
    &lt;file local="" type="excel"&gt;http://filestore/file2.xls&lt;/file&gt;
    &lt;file local="C:\file\file3.xls" type="excel" /&gt;
    &lt;file local="" type="ppt" /&gt;
  &lt;/title&gt;
  </code></pre>
  
  <p>Note: Elements are not closed properly e.g...</p>
  
  <pre><code>&lt;alt name /&gt; should be &lt;alt name&gt;&lt;/alt name&gt;
  </code></pre>
  
  <p>This is what I'm running...</p>
  
  <pre><code>import xml.etree.ElementTree as ET
  tree = ET.parse('file.nfo')
  root = tree.getroot()
  </code></pre>
  
  <p>The error I'm getting is...</p>
  
  <blockquote>
    <p>xml.etree.ElementTree.ParseError: not well-formed (invalid token):</p>
  </blockquote>
  
  <p>I've tried...</p>
  
  <pre><code>myparser = ET.XMLParser(encoding='UTF-8')
  tree = ET.parse('file.nfo', myparser)
  </code></pre>
  
  <p>Also tried, xmlparser, opening with codecs but i'm pretty sure its the formatting. I'm guessing the immediate issue is non-escaped > but i suspect ET needs opening/closing?</p>
  
  <p>I'm sure i could open this file and go through it with regex but i was hoping to use ElementTree. </p>
  
  <p>The end goal is to have the details from the nfo as a dictionary that looks like...</p>
  
  <pre><code>dict = {'title': [{'name': 'Test Name',
      'alt name': '',
      'file': [{'local': 'C:\file\file1.doc', 'type': 'word', 'url': 'http://filestore/file1.doc'},
          {'local': '', 'type': 'excel', 'url': 'http://filestore/file2.xls'},
          {'local': 'C:\file\file3.xls', 'type': 'excel', 'url': ''},
          {'local': '', 'type': 'ppt', 'url': ''}]
      }]}
  </code></pre>
  
  <p>I'm sure there is a better (more pythonic) way to do this but I'm pretty new to python.</p>
  
  <p>Any help would be appreciated</p>
  
  <p>EDIT: I'm also trying to avoid using 3rd party libraries if possible</p>