Overview | Package | Class | Tree | Deprecated | Index | Help
| Xerces 1.2.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.xml.parsers
Class SAXParserFactory

    java.lang.Object
      |
      +--javax.xml.parsers.SAXParserFactory

public abstract class SAXParserFactory
extends java.lang.Object

The `SAXParserFactory` defines a factory API that enables applications to configure and obtain a SAX based parser to parse XML documents.
ATTENTION: THIS IMPLEMENTATION OF THE "JAVAX.XML.PARSER" CLASSES IS NOT THE OFFICIAL REFERENCE IMPLEMENTATION OF THE JAVA SPECIFICATION REQUEST 5 FOUND AT http://java.sun.com/aboutJava/communityprocess/jsr/jsr_005_xml.html
THIS IMPLEMENTATION IS CONFORMANT TO THE "JAVA API FOR XML PARSING" SPECIFICATION VERSION 1.0 PUBLIC RELEASE 1 BY JAMES DUNCAN DAVIDSON PUBLISHED BY SUN MICROSYSTEMS ON FEB. 18, 2000 AND FOUND AT http://java.sun.com/xml
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Version:
  1.0 CVS $Revision: 1.4 $ $Date: 2000/06/02 23:42:21 $

Constructor Summary
`protected` | `SAXParserFactory()` Implementors of this abstract class must provide their own public no-argument constructor in order for the static `newInstance()` method to work correctly.

Method Summary
`boolean` | `isNamespaceAware()` Indicates if this `SAXParserFactory` is configured to produce parsers that are namespace aware or not.
`boolean` | `isValidating()` Indicates if this `SAXParserFactory` is configured to produce parsers that validate XML documents as they are parsed.
`static SAXParserFactory` | `newInstance()` Returns a new instance of a `SAXParserFactory`.
`abstract SAXParser` | `newSAXParser()` Returns a new configured instance of type `SAXParser`.
`void` | `setNamespaceAware(boolean aware)` Configuration method that specifies whether the parsers created by this factory are required to provide XML namespace support or not.
`void` | `setValidating(boolean validating)` Configuration method whether specifies if the parsers created by this factory are required to validate the XML documents that they parse.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SAXParserFactory

    protected SAXParserFactory()

  Implementors of this abstract class must provide their own public no-argument constructor in order for the static `newInstance()` method to work correctly.
  Application programmers should be able to instantiate an implementation of this abstract class directly if they want to use a specfic implementation of this API without using the static newInstance method to obtain the configured or platform default implementation.

Method Detail

### newInstance

    public static SAXParserFactory newInstance()

  Returns a new instance of a `SAXParserFactory`.
  The implementation of the SAX-ParserFactory returned depends on the setting of the `javax.xml.parsers.SAXParserFactory` system property or, if the property is not set, a platform specific default.
  Throws:
    `FactoryConfigurationError` - If the class implementing the factory cannot be found or instantiated. An `Error` is thrown instead of an exception because the application is not expected to handle or recover from such events.

### newSAXParser

    public abstract SAXParser newSAXParser()
                                    throws ParserConfigurationException,
                                           SAXException

  Returns a new configured instance of type `SAXParser`.
  Throws:
    `ParserConfigurationException` - If the `SAXParser` instance cannot be created with the requested configuration.
    `SAXException` - If the initialization of the underlying parser fails.

### setNamespaceAware

    public void setNamespaceAware(boolean aware)

  Configuration method that specifies whether the parsers created by this factory are required to provide XML namespace support or not.
  NOTE: if a parser cannot be created by this factory that satisfies the requested namespace awareness value, a `ParserConfigurationException` will be thrown when the program attempts to aquire the parser calling the `newSaxParser()` method.

### setValidating

    public void setValidating(boolean validating)

  Configuration method whether specifies if the parsers created by this factory are required to validate the XML documents that they parse.
  NOTE: if a parser cannot be created by this factory that satisfies the requested validation capacity, a `ParserConfigurationException` will be thrown when the application attempts to aquire the parser via the `newSaxParser()` method.

### isNamespaceAware

    public boolean isNamespaceAware()

  Indicates if this `SAXParserFactory` is configured to produce parsers that are namespace aware or not.

### isValidating

    public boolean isValidating()

  Indicates if this `SAXParserFactory` is configured to produce parsers that validate XML documents as they are parsed.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Xerces 1.2.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD