Skip to content

Commit

Permalink
Nokogiri::XML::Reader passes all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Serabe committed Jun 5, 2009
1 parent 3f64599 commit 9634a45
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ext/java/nokogiri/XmlReader.java
@@ -1,6 +1,7 @@
package nokogiri;

import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.util.LinkedList;
import java.util.Queue;
Expand Down Expand Up @@ -290,8 +291,10 @@ public void warning(SAXParseException ex) throws SAXParseException {
try {
XMLReader reader = XMLReaderFactory.createXMLReader();
reader.setContentHandler(handler);
reader.setDTDHandler(handler);
reader.setErrorHandler(handler);
reader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
return reader;
} catch (SAXException saxe) {
throw RaiseException.createNativeRaiseException(ruby, saxe);
Expand Down

0 comments on commit 9634a45

Please sign in to comment.