Java examples for XML:XML String Escape
unEscape XML String by replace
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { String s = "java2s.com"; System.out.println(unEscape(s)); }// ww w . j a v a 2s . c o m public static String unEscape(String s) { if (s == null) { return s; } return s.replaceAll("&", "&").replaceAll("<", "<") .replaceAll(">", ">").replaceAll("'", "'") .replaceAll(""", "\""); } }