Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
2f8eb8c8
Commit
2f8eb8c8
authored
Apr 18, 2024
by
litengwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_bugfix' into develop_dl_bugfix
parents
43543c34
71c7481d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
50 deletions
+0
-50
WordHtml.java
...n/java/com/yeejoin/equipmanage/common/utils/WordHtml.java
+0
-25
WordHtml.java
.../java/com/yeejoin/amos/patrol/business/util/WordHtml.java
+0
-25
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/utils/WordHtml.java
View file @
2f8eb8c8
...
@@ -192,30 +192,5 @@ public class WordHtml implements AbstractHtml {
...
@@ -192,30 +192,5 @@ public class WordHtml implements AbstractHtml {
}
}
}
}
}
}
public
static
void
xml2Ttml
(
String
docPath
,
String
xsltPath
,
String
hrmlPath
)
{
try
(
//创建XML的文件输入流
FileInputStream
fis
=
new
FileInputStream
(
org
.
apache
.
commons
.
io
.
FilenameUtils
.
normalize
(
docPath
));
//创建XSL文件的输入流
FileInputStream
fis1
=
new
FileInputStream
(
FilenameUtils
.
normalize
(
xsltPath
));
PrintStream
stm
=
new
PrintStream
(
hrmlPath
);
)
{
Source
source
=
new
StreamSource
(
fis
);
Source
template
=
new
StreamSource
(
fis1
);
//讲转换后的结果输出到 stm 中即 F:\123.html
Result
result
=
new
StreamResult
(
stm
);
//根据XSL文件创建准个转换对象
TransformerFactory
transformerFactory
=
TransformerFactory
.
newInstance
();
transformerFactory
.
setFeature
(
XMLConstants
.
FEATURE_SECURE_PROCESSING
,
true
);
transformerFactory
.
setAttribute
(
XMLConstants
.
ACCESS_EXTERNAL_DTD
,
""
);
Transformer
transformer
=
transformerFactory
.
newTransformer
(
template
);
//处理xml进行交换
transformer
.
transform
(
source
,
result
);
}
catch
(
TransformerException
|
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/util/WordHtml.java
View file @
2f8eb8c8
...
@@ -191,30 +191,5 @@ public class WordHtml implements AbstractHtml {
...
@@ -191,30 +191,5 @@ public class WordHtml implements AbstractHtml {
}
}
}
}
public
static
void
xml2Ttml
(
String
docPath
,
String
xsltPath
,
String
hrmlPath
)
{
try
(
//创建XML的文件输入流
FileInputStream
fis
=
new
FileInputStream
(
FilenameUtils
.
normalize
(
docPath
));
//创建XSL文件的输入流
FileInputStream
fis1
=
new
FileInputStream
(
FilenameUtils
.
normalize
(
xsltPath
));
PrintStream
stm
=
new
PrintStream
(
hrmlPath
);
)
{
Source
source
=
new
StreamSource
(
fis
);
Source
template
=
new
StreamSource
(
fis1
);
//讲转换后的结果输出到 stm 中即 F:\123.html
Result
result
=
new
StreamResult
(
stm
);
//根据XSL文件创建准个转换对象
TransformerFactory
transformerFactory
=
TransformerFactory
.
newInstance
();
transformerFactory
.
setFeature
(
XMLConstants
.
FEATURE_SECURE_PROCESSING
,
true
);
transformerFactory
.
setAttribute
(
XMLConstants
.
ACCESS_EXTERNAL_DTD
,
""
);
Transformer
transformer
=
transformerFactory
.
newTransformer
(
template
);
//处理xml进行交换
transformer
.
transform
(
source
,
result
);
}
catch
(
TransformerException
|
IOException
e
)
{
e
.
printStackTrace
();
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment