title: Catch an error in case of bad XML
body: <p>I am using <code>xml.dom.minidom</code> for parsing some XML from a string. I need to handle an error case when the supplied XML is malformed. What error do I catch?</p>
  
  <p>In other words, what should replace <code>BadXml</code> below?</p>
  
  <pre><code>try:
      from xml.dom import minidom
      in_xml = minidom.parseString(some_string)
  except BadXml:
      handle_bad_xml(some_string)
  </code></pre>