Google

Xerces 3.1.1 API: Class XMLReaderFactory
Xerces 3.1.1


Class XMLReaderFactory

java.lang.Object
  |

public final class XMLReaderFactory
extends java.lang.Object

Factory for creating an XML reader.

This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY.

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

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

Note that these methods will not be usable in environments where system properties are not accessible or where the application or applet is not permitted to load classes dynamically.

Note to implementors: SAX implementations in specialized environments may replace this class with a different one optimized for the environment, as long as its method signatures remain the same.

Since:
SAX 2.0
Version:
2.0

Method Summary

          Attempt to create an XML reader from a system property.

          Attempt to create an XML reader from a class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createXMLReader

Attempt to create an XML reader from a system property.

This method uses the value of the system property and tries to instantiate that class as a SAX2 XMLReader.

Note that many Java interpreters allow system properties to be specified on the command line.


createXMLReader

Attempt to create an XML reader from a class name.

Given a class name, this method attempts to load and instantiate the class as an XML reader.


Xerces 3.1.1