Skip to content

Commit

Permalink
xinclude setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ncrouzier-nist committed Nov 14, 2022
1 parent 33caba8 commit 4e2d673
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public ConstraintManager(String constraintXml) {
try {
if (constraintXml != null) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setXIncludeAware(false);
DocumentBuilder builder = factory.newDocumentBuilder();
doc = builder.parse(IOUtils.toInputStream(constraintXml));
}
Expand All @@ -62,6 +63,7 @@ public ConstraintManager(String constraintXml, String additionalConstraintXml) {
try {
if (constraintXml != null) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setXIncludeAware(false);
DocumentBuilder builder = factory.newDocumentBuilder();
doc = builder.parse(IOUtils.toInputStream(constraintXml));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ private ProfileElement process(Component c, ProfileElement parent)

private Document toDoc(String xmlSource) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setXIncludeAware(false);
factory.setNamespaceAware(true);
factory.setIgnoringComments(false);
factory.setIgnoringElementContentWhitespace(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ public File zip(List<File> files, String filename) throws Exception {

protected Document toDoc(String xmlSource) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setXIncludeAware(false);
factory.setNamespaceAware(true);
factory.setIgnoringComments(false);
factory.setIgnoringElementContentWhitespace(true);
Expand Down Expand Up @@ -201,6 +202,7 @@ public String changeVsId(String content) throws Exception {

public static Document stringToDom(String xmlSource) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setXIncludeAware(false);
factory.setNamespaceAware(true);
factory.setIgnoringComments(false);
factory.setIgnoringElementContentWhitespace(true);
Expand Down

0 comments on commit 4e2d673

Please sign in to comment.