Reputation: 6124
Invalid XML: Error on line 190: An invalid XML character (Unicode: 0x10) was found in the CDATA section.
I get this error while parsing an XML file, I used String.replaceAll to replace this character but my regex pattern seems to be incorrect.
The following is a different string, but it just gives me back the original string. How should I do it?
str = str.replaceAll("\\^p", "");
Upvotes: 0
Views: 2862
Reputation: 41848
Use this:
String replaced = your_original_string.replaceAll("\\x10", "");
xdd...
is the Java syntax to match a single unicode characterUnicode: 0x10
Upvotes: 5
Reputation: 109613
str = str.replace("\u0010", "");
Or maybe you need a space
str = str.replace("\u0010", " ");
Upvotes: 1