I\'m using Xerces to parse my XML document. The issue is that XML escaped characters like
appear in characters()
method as non-escap
There is one more may: escapeXml
method of org.apache.commons.lang.StringEscapeUtils
class.
Try this code in your characters(char[] ch, int start, int length)
method:
String data=new String(ch, start, length);
String escapedData=org.apache.commons.lang.StringEscapeUtils.escapeXml(data);
You may download the jar here.