public IRubyObject xml_version(ThreadContext context) {
return currentNode().getXmlVersion();
}
protected XMLPullParserConfiguration createReader(Ruby ruby, Options options) {
StandardParserConfiguration config = new StandardParserConfiguration();
DocumentHandler handler = new DocumentHandler(ruby);
// XMLReader reader = XMLReaderFactory.createXMLReader();
config.setDocumentHandler(handler);
config.setDTDHandler(handler);
config.setErrorHandler(handler);
config.setEntityResolver(new EntityResolver2Wrapper(new NokogiriEntityResolver(ruby, null, options)));
// config.setFeature("http://xml.org/sax/features/xmlns-uris", true);
// config.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
config.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", options.dtdLoad || options.dtdValid);
return config;
}