Here you can find the source of unescapeXml(String str)
public static String unescapeXml(String str)
//package com.java2s; //License from project: LGPL public class Main { public static String unescapeXml(String str) { str = replace(str, """, "\""); str = replace(str, "<", "<"); str = replace(str, ">", ">"); str = replace(str, "&", "&"); str = replace(str, "'", "'"); return str; }//from w w w.ja v a2 s.co m protected static String replace(String str, String replace, String replacement) { int i = str.indexOf(replace); while (i >= 0) { str = str.substring(0, i) + replacement + str.substring(i + replace.length()); i = str.indexOf(replace); } return str; } }