title: Parsing XML with python ElementTree: ParseError: mismatched tag
body: <p>I have several XML files I have to parse through with python ElemetTree (they are legacy from another developer).</p>
  
  <p>I've corrected those files a bit and parsed a good chunk so far but at some moment I got this parsing error, and I can't get around it. Tried parsing the original file (i was working with a copy ofcourse), and it's still the same error even though it used to work fine in the first place.</p>
  
  <p>Error:
  <code>ParseError: mismatched tag</code></p>
  
  <p>My code is:</p>
  
  <pre class="lang-py prettyprint-override"><code>import xml.etree.ElementTree as ET
  tree = ET.parse('astrod.xml')
  </code></pre>
  
  <p>Full error text:</p>
  
  <pre><code>Traceback (most recent call last):
  
    File "D:\dev\tools\Anaconda\lib\site-packages\IPython\core\interactiveshell.py", line 3326, in run_code
      exec(code_obj, self.user_global_ns, self.user_ns)
  
    File "&lt;ipython-input-4-6aa074179306&gt;", line 2, in &lt;module&gt;
      tree = ET.parse('astrod.xml')
  
    File "D:\dev\tools\Anaconda\lib\xml\etree\ElementTree.py", line 1197, in parse
      tree.parse(source, parser)
  
    File "D:\dev\tools\Anaconda\lib\xml\etree\ElementTree.py", line 598, in parse
      self._root = parser._parse_whole(source)
  
    File "&lt;string&gt;", line unknown
  ParseError: mismatched tag: line 449, column 3
  </code></pre>