Java tutorial
//package com.java2s; //License from project: Apache License public class Main { /** * get XML text for name and value of attribute. The value's < and > gets escaped (ampersands do not, for compatibility reasons). * * @param name * @param value * @deprecated Thou shall not produce XML by hand. */ public static String wrapatt(final String name, final String value) { final String escapedValue = value.replace(">", ">").replace("<", "<"); return " " + name + "=" + "\"" + escapedValue + "\""; } }