Skip to content

Commit

Permalink
Turn off schema validation, since the main input files are not specif…
Browse files Browse the repository at this point in the history
…ying it anyway
  • Loading branch information
robcasloz committed Apr 1, 2021
1 parent 098f405 commit a6471d8
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -566,14 +566,8 @@ public void setInvokeLater(boolean invokeLater) {
private XMLReader createReader() throws SAXException {
try {
SAXParserFactory pfactory = SAXParserFactory.newInstance();
pfactory.setValidating(true);
pfactory.setValidating(false);
pfactory.setNamespaceAware(true);

// Enable schema validation
SchemaFactory sfactory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema");
InputStream stream = Parser.class.getResourceAsStream("graphdocument.xsd");
pfactory.setSchema(sfactory.newSchema(new Source[]{new StreamSource(stream)}));

return pfactory.newSAXParser().getXMLReader();
} catch (ParserConfigurationException ex) {
throw new SAXException(ex);
Expand Down

0 comments on commit a6471d8

Please sign in to comment.