Permalink
Browse files

Try to switch of dtd downloading

  • Loading branch information...
1 parent 5acd615 commit 242b5067df18ec048a80bee4190cca0b873d5805 @shellac committed Jan 7, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/main/java/net/rootdev/javardfa/ParserFactory.java
@@ -47,6 +47,9 @@ public static Format lookup(String format) {
public static XMLReader createNonvalidatingReader() throws SAXException {
XMLReader reader = XMLReaderFactory.createXMLReader();
reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
+ try {
+ reader.setFeature("http://www.xml.org/sax/features/validation", false);
+ } catch (Exception e) {} // continue whether this is recognised
return reader;
}

0 comments on commit 242b506

Please sign in to comment.