Java tutorial
//package com.java2s; public class Main { public static String xmlConv(String input) { String s = input; s = s.replaceAll("&", "&"); s = s.replaceAll("<", "<"); s = s.replaceAll(">", ">"); s = s.replaceAll("'", "'"); s = s.replaceAll(""", "\""); return s; } }