/** * * @Title: filterXmlChar * @Description: TODO(解决 '<' 和 '&' 特殊字符的问题) * @param str * @return String */ private static String filterXmlChar(String str) { String retstr = ""; if (notEmpty(str)) { retstr = str.replaceAll("<","<") .replaceAll(">",">") .replaceAll("&","&") .replaceAll("'","'") .replaceAll("\"","""); } return retstr; }