XStream解析下划线出现重复问题 博客分类: study javaxmlXStream下划线
程序员文章站
2024-03-22 19:17:16
...
直接看代码
XStream xs = new XStream(new XppDriver(new XmlFriendlyReplacer("_-", "_")));//解决解析下划线时出现双下划线 xs.alias("request", Request.class); String xml = xs.toXML(request);