Parsing an xml file on Java I get the error:
An invalid XML character (Unicode: 0x0) was found in the element content of the document.
The xml c
fixed with this code:
String cleanXMLString = null; Pattern pattern = null; Matcher matcher = null; pattern = Pattern.compile("[\\000]*"); matcher = pattern.matcher(dirtyXMLString); if (matcher.find()) { cleanXMLString = matcher.replaceAll(""); }