title: How to tell Java SAX Parser to ignore invalid character references?
body: <p>When trying to parse incorrect XML with a character reference such as <code>&amp;#x1</code>, Java's SAX Parser dies a horrible death with a fatal error such as</p>
  
  <pre><code>    org.xml.sax.SAXParseException: Character reference "&amp;#x1"
                                     is an invalid XML character.
  </code></pre>
  
  <p>Is there any way around this? Will I have to clean up the XML file before I hand it off to the SAX Parser? If so, is there an elegant way of going about this?</p>