Java tutorial
//package com.java2s; public class Main { public static String cleanFromXML(String cleanMe) { if (cleanMe != null) { cleanMe = cleanMe.replaceAll("&", "&"); cleanMe = cleanMe.replaceAll("<", "<"); cleanMe = cleanMe.replaceAll(">", ">"); cleanMe = cleanMe.replaceAll(""", "\""); return cleanMe; } return ""; } }