Java tutorial
//package com.java2s; /* * XmlUtil.java * * (c) 2009 The Echo Nest * See "license.txt" for terms * * */ public class Main { public static String entify(String s) { s = s.replaceAll("<", "<"); s = s.replaceAll(">", ">"); s = s.replaceAll("&", "&"); return s; } }