org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x7)

前端之家收集整理的这篇文章主要介绍了org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x7)前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

我想用replaceAll("[\\r\\n]",",")把空白方框乱码替换掉,匹配不到这个字符,怎么匹配到这个字符?

java.util.regex.Pattern INVALID_XML_CHARS = Pattern.compile("[^\\u0009\\u000A\\u000D\\u0020-\\uD7FF\\uE000-\\uFFFD\uD800\uDC00-\uDBFF\uDFFF]");

x_contact_method = INVALID_XML_CHARS.matcher(x_contact_method).replaceAll(" ");

原文链接:https://www.f2er.com/xml/300265.html

猜你在找的XML相关文章