org.xml.sax.helpers
Class ParserFactory

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by org.xml.sax.helpers.ParserFactory

Deprecated. This class works with the deprecated Parser sample code for org.xml.sax.Parser definition code for org.xml.sax.Parser interface.

public class ParserFactory
extends Object sample code for java.lang.Object definition code for java.lang.Object

Java-specific class for dynamically loading SAX parsers.

This module, both source code and documentation, is in the Public Domain, and comes with NO WARRANTY. See http://www.saxproject.org for further information.

Note: This class is designed to work with the now-deprecated SAX1 Parser sample code for org.xml.sax.Parser definition code for org.xml.sax.Parser class. SAX2 applications should use XMLReaderFactory sample code for org.xml.sax.helpers.XMLReaderFactory definition code for org.xml.sax.helpers.XMLReaderFactory instead.

ParserFactory is not part of the platform-independent definition of SAX; it is an additional convenience class designed specifically for Java XML application writers. SAX applications can use the static methods in this class to allocate a SAX parser dynamically at run-time based either on the value of the `org.xml.sax.parser' system property or on a string containing the class name.

Note that the application still requires an XML parser that implements SAX1.

Since:
SAX 1.0

Method Summary
static Parser sample code for org.xml.sax.Parser definition code for org.xml.sax.Parser makeParser sample code for org.xml.sax.helpers.ParserFactory.makeParser() definition code for org.xml.sax.helpers.ParserFactory.makeParser() ()
          Deprecated. Create a new SAX parser using the `org.xml.sax.parser' system property.
static Parser sample code for org.xml.sax.Parser definition code for org.xml.sax.Parser makeParser sample code for org.xml.sax.helpers.ParserFactory.makeParser(java.lang.String) definition code for org.xml.sax.helpers.ParserFactory.makeParser(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  className)
          Deprecated. Create a new SAX parser object using the class name provided.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Method Detail

makeParser sample code for org.xml.sax.helpers.ParserFactory.makeParser() definition code for org.xml.sax.helpers.ParserFactory.makeParser()

public static Parser sample code for org.xml.sax.Parser definition code for org.xml.sax.Parser  makeParser()
                         throws ClassNotFoundException sample code for java.lang.ClassNotFoundException definition code for java.lang.ClassNotFoundException ,
                                IllegalAccessException sample code for java.lang.IllegalAccessException definition code for java.lang.IllegalAccessException ,
                                InstantiationException sample code for java.lang.InstantiationException definition code for java.lang.InstantiationException ,
                                NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException ,
                                ClassCastException sample code for java.lang.ClassCastException definition code for java.lang.ClassCastException 
Deprecated. 
Create a new SAX parser using the `org.xml.sax.parser' system property.

The named class must exist and must implement the Parser sample code for org.xml.sax.Parser definition code for org.xml.sax.Parser interface.

Throws:
NullPointerException sample code for java.lang.NullPointerException definition code for java.lang.NullPointerException - There is no value for the `org.xml.sax.parser' system property.
ClassNotFoundException sample code for java.lang.ClassNotFoundException definition code for java.lang.ClassNotFoundException - The SAX parser class was not found (check your CLASSPATH).
IllegalAccessException sample code for java.lang.IllegalAccessException definition code for java.lang.IllegalAccessException - The SAX parser class was found, but you do not have permission to load it.
InstantiationException sample code for java.lang.InstantiationException definition code for java.lang.InstantiationException - The SAX parser class was found but could not be instantiated.
ClassCastException sample code for java.lang.ClassCastException definition code for java.lang.ClassCastException - The SAX parser class was found and instantiated, but does not implement org.xml.sax.Parser.
See Also:
makeParser(java.lang.String) sample code for org.xml.sax.helpers.ParserFactory.makeParser(java.lang.String) definition code for org.xml.sax.helpers.ParserFactory.makeParser(java.lang.String) , Parser sample code for org.xml.sax.Parser definition code for org.xml.sax.Parser

makeParser sample code for org.xml.sax.helpers.ParserFactory.makeParser(java.lang.String) definition code for org.xml.sax.helpers.ParserFactory.makeParser(java.lang.String)

public static Parser sample code for org.xml.sax.Parser definition code for org.xml.sax.Parser  makeParser(String sample code for java.lang.String definition code for java.lang.String  className)
                         throws ClassNotFoundException sample code for java.lang.ClassNotFoundException definition code for java.lang.ClassNotFoundException ,
                                IllegalAccessException sample code for java.lang.IllegalAccessException definition code for java.lang.IllegalAccessException ,
                                InstantiationException sample code for java.lang.InstantiationException definition code for java.lang.InstantiationException ,
                                ClassCastException sample code for java.lang.ClassCastException definition code for java.lang.ClassCastException 
Deprecated. 
Create a new SAX parser object using the class name provided.

The named class must exist and must implement the Parser sample code for org.xml.sax.Parser definition code for org.xml.sax.Parser interface.

Parameters:
className - A string containing the name of the SAX parser class.
Throws:
ClassNotFoundException sample code for java.lang.ClassNotFoundException definition code for java.lang.ClassNotFoundException - The SAX parser class was not found (check your CLASSPATH).
IllegalAccessException sample code for java.lang.IllegalAccessException definition code for java.lang.IllegalAccessException - The SAX parser class was found, but you do not have permission to load it.
InstantiationException sample code for java.lang.InstantiationException definition code for java.lang.InstantiationException - The SAX parser class was found but could not be instantiated.
ClassCastException sample code for java.lang.ClassCastException definition code for java.lang.ClassCastException - The SAX parser class was found and instantiated, but does not implement org.xml.sax.Parser.
See Also:
makeParser() sample code for org.xml.sax.helpers.ParserFactory.makeParser() definition code for org.xml.sax.helpers.ParserFactory.makeParser() , Parser sample code for org.xml.sax.Parser definition code for org.xml.sax.Parser