Here you can find the source of unescapeXml(String input)
public static String unescapeXml(String input)
//package com.java2s; //License from project: Open Source License public class Main { private static final String[] encoded = { "&", "<", ">", """, "'" }; private static final String[] decoded_origin = { "&", "<", ">", "\"", "\'" }; public static String unescapeXml(String input) { if (input == null) { return null; }/*from w w w .ja v a 2s . c o m*/ return translateAll(input, encoded, decoded_origin); } public static String translateAll(String input, String[] patterns, String[] replacements) { String result = input; for (int i = 0; i < patterns.length; i++) { result = result.replaceAll(patterns[i], replacements[i]); } return result; } }