A very simple but inefficient solution without any external library is:
public static String unescapeHtml3( String str ) {
try {
HTMLDocument doc = new HTMLDocument();
new HTMLEditorKit().read( new StringReader( "<html><body>" + str ), doc, 0 );
return doc.getText( 1, doc.getLength() );
} catch( Exception ex ) {
return str;
}
}
This should be use only if you have only small count of string to decode.