I'm writing the contents of my DB to an XML file, but trying to open the outputted XML in Firefox, I get the following exception:
XML Parsing Error: reference to invalid character number
The offending character being:
ampersand-hash-11-semicolon
How do I filter this gremlin out?
I've tried various things:
line = line.replace("\u0011", ""); //is this correct????
and a variety of methods in the commons.lang.StringUtils class. But none of them work. This character still slips through.
Any suggestions on how I might purge this gremlin would be much appreciated.
Many thanks