Skip to content

Commit 9570de5

Browse files
committed
docs:增加注释内容
1 parent 8797cb3 commit 9570de5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gen/src/main/java/com/gitee/gen/util/FormatUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.gitee.gen.util;
22

33
import org.dom4j.Document;
4+
import org.dom4j.DocumentHelper;
45
import org.dom4j.io.OutputFormat;
56
import org.dom4j.io.SAXReader;
67
import org.dom4j.io.XMLWriter;
@@ -26,6 +27,7 @@ public static String formatXml(String input) {
2627
// 注释:创建输出格式
2728
OutputFormat formater = OutputFormat.createPrettyPrint();
2829
// formater=OutputFormat.createCompactFormat();
30+
// format.setSuppressDeclaration(true);//去掉顶部的<?xml version="1.0" encoding="utf-8"?>
2931
// 注释:设置xml的输出编码
3032
formater.setEncoding("utf-8");
3133
// TAB缩进
@@ -45,6 +47,4 @@ public static String formatXml(String input) {
4547
return input;
4648
}
4749
}
48-
49-
5050
}

0 commit comments

Comments
 (0)