StringUtils { public static String escapeXML(CharSequence input) { return XMLRESERVED.matcher(input).replaceAll("_"); } private  StringUtils(); static String toString(Object obj); static T fromString(String str); static String escapeXML(CharSequence input);  }
@Test public void testEscape() throws Exception { String res = StringUtils.escapeXML("\",\',&,>,<"); assertEquals("_,_,_,_,_", res); }