src/main/java/com/whyc/dto/XmlFileOpreate.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/whyc/dto/XmlFileOpreate.java
@@ -305,7 +305,9 @@ //System.out.println(mapKey+":"+mapValue); //得到第一个mapKey节点 Node node=document.selectSingleNode("//"+mapKey); node.setText(mapValue); if(node!=null){ node.setText(mapValue); } } OutputFormat format = OutputFormat.createPrettyPrint(); format.setEncoding("UTF-8");//默认的编码就是UTF-8