/** * Escape <, >, &, ', " as their entities and * drop characters that are illegal in XML documents. * @param value the string to encode. * @return the encoded string. */ public String encode(String value) { return encode(value, false); }
/** * Escape <, >, &, ', " as their entities, \n, * \r and \t as numeric entities and drop characters that are * illegal in XML documents. * @param value the string to encode. * @return the encoded string. */ public String encodeAttributeValue(String value) { return encode(value, true); }