制度手册多个大标题标签sect的情况处理
This commit is contained in:
parent
ff4e5ec531
commit
84cca3442c
Binary file not shown.
@ -267,7 +267,14 @@ public class Report1Gener {
|
|||||||
|
|
||||||
// 获取字符串
|
// 获取字符串
|
||||||
content = getFileContent(file);
|
content = getFileContent(file);
|
||||||
content = content.substring(content.indexOf("<wx:sect>") + 9, content.indexOf("<w:sectPr"));
|
// content = content.substring(content.indexOf("<wx:sect>") + 9, content.indexOf("<w:sectPr"));
|
||||||
|
content = content.substring(content.indexOf("<w:body>") + 8 , content.indexOf("</w:body>"));
|
||||||
|
String [] arr = content.split("</wx:sect>");
|
||||||
|
StringBuilder tmp = new StringBuilder();
|
||||||
|
for (int i = 0; i < arr.length; i++) {
|
||||||
|
tmp.append(arr[i].substring(arr[i].indexOf("<wx:sect>") + 9));
|
||||||
|
}
|
||||||
|
content = tmp.toString();
|
||||||
// System.out.println(content);
|
// System.out.println(content);
|
||||||
// System.out.println("以上的是替换前文本,以下是替换后文本");
|
// System.out.println("以上的是替换前文本,以下是替换后文本");
|
||||||
String [] contentArr = content.split("<w:ilfo w:val=\"");
|
String [] contentArr = content.split("<w:ilfo w:val=\"");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user