如下:
//处理特殊字符 public String dealSpecialXml(String xml){ String result = ""; //result = xml.replaceAll("", ""); result = xml.replaceAll("[\\x01-\\x1f]", ""); // String value = null; // Pattern p = Pattern.compile("[\\x01-\\x1f]"); // Matcher m = p.matcher(xml); // result = m.replaceAll(""); //result = HtmlUtils.htmlEscape(result); return result; }