Basically I would like to decode a given Html document, and replace all special chars, such as \" \"
-> \" \"
, \">\"
-
This did the job for me,
import org.apache.commons.lang.StringEscapeUtils;
...
String decodedXML= StringEscapeUtils.unescapeHtml(encodedXML);
or
import org.apache.commons.lang3.StringEscapeUtils;
...
String decodedXML= StringEscapeUtils.unescapeHtml4(encodedXML);
I guess its always better to use the lang3
for obvious reasons.
Hope this helps :)