Here you can find the source of XmlEscape(String value)
public static String XmlEscape(String value)
//package com.java2s; //License from project: Open Source License public class Main { public static String XmlEscape(String value) { if (value == null) return null; value = value.replaceAll("&", "&"); value = value.replaceAll("<", "<"); value = value.replaceAll(">", ">"); return value; }//from ww w. ja va 2 s. c o m }