Skip to content

Commit 836c4df

Browse files
authored
Merge pull request SAML-Toolkits#370 from kemalturksonmez/master
Update parseXML to use XMLErrorAccumulatorHandler
2 parents 1198878 + c02eb9f commit 836c4df

File tree

1 file changed

+2
-0
lines changed
  • core/src/main/java/com/onelogin/saml2/util

1 file changed

+2
-0
lines changed

core/src/main/java/com/onelogin/saml2/util/Util.java

+2
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,8 @@ public static Document parseXML(InputSource inputSource) throws ParserConfigurat
394394
} catch (Throwable e) {}
395395

396396
DocumentBuilder builder = docfactory.newDocumentBuilder();
397+
XMLErrorAccumulatorHandler errorAcumulator = new XMLErrorAccumulatorHandler();
398+
builder.setErrorHandler(errorAcumulator);
397399
Document doc = builder.parse(inputSource);
398400

399401
// Loop through the doc and tag every element with an ID attribute

0 commit comments

Comments
 (0)