title: XML parsing with SAX | how to handle special characters?
body: <p>We have a JAVA application that pulls the data from SAP, parses it and renders to the users.
  The data is pulled using JCO connector.</p>
  
  <p>Recently we were thrown an exception:</p>
  
  <pre><code>org.xml.sax.SAXParseException: Character reference "&amp;#00" is an invalid XML character.
  </code></pre>
  
  <p>So, we are planning to write a new level of indirection where ALL special/illegal characters are replaced BEFORE parsing the XML.</p>
  
  <p>My questions here are :</p>
  
  <ol>
  <li>Is there any existing(open source) utility that does this job of replacing illegal characters in XML?</li>
  <li>Or if I had to write such utility, how should i handle them?</li>
  <li>Why is the above exception thrown?</li>
  </ol>
  
  <p>Thank You.</p>