Module java.xml

Class XMLReaderFactory

java.lang.Object
org.xml.sax.helpers.XMLReaderFactory

@Deprecated(since="9") public final class XMLReaderFactory extends Object
Deprecated.
It is recommended to use SAXParserFactory instead.
Factory for creating an XML reader.

This class contains static methods for creating an XML reader from an explicit class name, or based on runtime defaults:

 try {
   XMLReader myReader = XMLReaderFactory.createXMLReader();
 } catch (SAXException e) {
   System.err.println(e.getMessage());
 }
 

Note to Distributions bundled with parsers: You should modify the implementation of the no-arguments createXMLReader to handle cases where the external configuration mechanisms aren't set up. That method should do its best to return a parser when one is in the class path, even when nothing bound its class name to org.xml.sax.driver so those configuration mechanisms would see it.

Since:
1.4, SAX 2.0