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.
Recently we were thrown an exception:
org.xml.sax.SAXParseException: Character reference "�" is an invalid XML character.
So, we are planning to write a new level of indirection where ALL special/illegal characters are replaced BEFORE parsing the XML.
My questions here are :
- Is there any existing(open source) utility that does this job of replacing illegal characters in XML?
- Or if I had to write such utility, how should i handle them?
- Why is the above exception thrown?
Thank You.