title: python - Parse XML with unicode characters into ElementTree
body: <p>I'm using <a href="https://github.com/pdfminer/pdfminer.six" rel="nofollow noreferrer">PDFminer</a>, but it contains a bug and I get the following invalid XML file:</p>
  
  <pre><code>&lt;?xml version="1.1" encoding="UTF-8"?&gt;
  &lt;string size="16"&gt;&amp;#244;&amp;#130;&amp;#204;&amp;#2;f&amp;#198;&amp;#135;&amp;#143;&amp;#11;*&amp;#154;&amp;#23;]&amp;#214;&amp;#20;[&lt;/string&gt;
  </code></pre>
  
  <p>When I'm trying to parse it with <code>ElementTree</code> I'm getting the following error:</p>
  
  <pre><code>    bookXml = xml.etree.ElementTree.parse(filename)
    File "C:\Users\User\Anaconda3\lib\xml\etree\ElementTree.py", line 1196, in parse
      tree.parse(source, parser)
    File "C:\Users\User\Anaconda3\lib\xml\etree\ElementTree.py", line 597, in parse
      self._root = parser._parse_whole(source)
  xml.etree.ElementTree.ParseError: reference to invalid character number: line 1, column 36
  </code></pre>
  
  <p>I think best way to handle this case is to fix XML first, but how?</p>