I have the following XML snippet in a string (note the double encoded &):
...
<PARA>
S&amp;P
</PARA>
...
My desired output would be:
> ... <PARA> S&P </PARA> ...
If I use:
StringEscapeUtils.unescapeXml()
The actual oputput is:
> ... <PARA> S&P </PARA> ...
It seems that StringEscapeUtils.unescapeXml() escapes the input twice, or as long as it contains entities.
Is there a better utility method, or simple solution that can unescape every xml entity (not just a few but all accentuated character) once, so that my encoded & part does not get screwed up?
Thank, Peter