List of utility methods to do XML String Escape
void | appendPlainText(StringBuilder dest, String src) append Plain Text if (src == null) return; int len = src.length(); for (int i = 0; i < len; i++) { char ch = src.charAt(i); switch (ch) { case '&': dest.append("&"); ... |
Map | buildBuiltinXMLEntityMap() build Builtin XML Entity Map Map<String, String> entities = new HashMap<String, String>(10); entities.put("lt", "<"); entities.put("gt", ">"); entities.put("amp", "&"); entities.put("apos", "'"); entities.put("quot", "\""); return entities; |