/** * Return the XMLReader to be used for parsing the input document. * * @exception SAXException if no XMLReader can be instantiated */ public synchronized XMLReader getXMLReader() throws SAXException { if (reader == null) { reader = getParser().getXMLReader(); // while this is supposed to be false by default, some parsers // (in particular Oracle XML parser in oc4j 10.1.3.1) sets the incorrect default value, // so make sure we got the right value. reader.setFeature("http://xml.org/sax/features/namespace-prefixes",false); if (this.defaultNamespaceURI != null) { reader = new DefaultNamespaceFilter(this.defaultNamespaceURI,reader); } } //set up the parse reader.setContentHandler(this); reader.setDTDHandler(this); //reader.setEntityResolver(this); reader.setErrorHandler(this); return reader; }
/** * Return the XMLReader to be used for parsing the input document. * * @exception SAXException if no XMLReader can be instantiated */ public synchronized XMLReader getXMLReader() throws SAXException { if (reader == null) { reader = getParser().getXMLReader(); if (!allowDtdToCallExternalEntities) { reader.setFeature("http://xml.org/sax/features/external-general-entities", false); reader.setFeature("http://xml.org/sax/features/external-parameter-entities", false); reader.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false); } if (this.defaultNamespaceURI != null) { reader = new DefaultNamespaceFilter(this.defaultNamespaceURI,reader); } } //set up the parse reader.setContentHandler(this); reader.setDTDHandler(this); //reader.setEntityResolver(this); reader.setErrorHandler(this); return reader; }
/** * Return the XMLReader to be used for parsing the input document. * * @exception SAXException if no XMLReader can be instantiated */ public synchronized XMLReader getXMLReader() throws SAXException { if (reader == null) { reader = getParser().getXMLReader(); // while this is supposed to be false by default, some parsers // (in particular Oracle XML parser in oc4j 10.1.3.1) sets the incorrect default value, // so make sure we got the right value. reader.setFeature("http://xml.org/sax/features/namespace-prefixes",false); if (this.defaultNamespaceURI != null) { reader = new DefaultNamespaceFilter(this.defaultNamespaceURI,reader); } } //set up the parse reader.setContentHandler(this); reader.setDTDHandler(this); //reader.setEntityResolver(this); reader.setErrorHandler(this); return reader; }
/** * Return the XMLReader to be used for parsing the input document. * * @exception SAXException if no XMLReader can be instantiated */ public synchronized XMLReader getXMLReader() throws SAXException { if (reader == null) { reader = getParser().getXMLReader(); // while this is supposed to be false by default, some parsers // (in particular Oracle XML parser in oc4j 10.1.3.1) sets the incorrect default value, // so make sure we got the right value. reader.setFeature("http://xml.org/sax/features/namespace-prefixes",false); if (this.defaultNamespaceURI != null) { reader = new DefaultNamespaceFilter(this.defaultNamespaceURI,reader); } } //set up the parse reader.setContentHandler(this); reader.setDTDHandler(this); //reader.setEntityResolver(this); reader.setErrorHandler(this); return reader; }