Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

javax.xml.parsers
Class SAXParser  view SAXParser download SAXParser.java

java.lang.Object
  extended byjavax.xml.parsers.SAXParser

public abstract class SAXParser
extends java.lang.Object

Convenience class for using or accessing a SAX version 1 or 2 parser. Instances of this class are not guaranteed to be thread safe.


Constructor Summary
protected SAXParser()
           
 
Method Summary
abstract  org.xml.sax.Parser getParser()
          Returns the underlying SAX1 parser.
abstract  java.lang.Object getProperty(java.lang.String name)
          Returns the value of the specified SAX2 parser property.
 javax.xml.validation.Schema getSchema()
          Returns the schema in use by this parser.
abstract  org.xml.sax.XMLReader getXMLReader()
          Returns the underlying SAX2 parser.
abstract  boolean isNamespaceAware()
          Indicates whether this parser is XML Namespace aware.
abstract  boolean isValidating()
          Indicates whether this parser will validate its input.
 boolean isXIncludeAware()
          Indicates whether this parser is XInclude-aware.
 void parse(java.io.File f, org.xml.sax.helpers.DefaultHandler dh)
          Parse the content of the specified file, reporting SAX2 events to the given handler.
 void parse(java.io.File f, org.xml.sax.HandlerBase hb)
          Parse the content of the specified file, reporting SAX1 events to the given handler.
 void parse(org.xml.sax.InputSource is, org.xml.sax.helpers.DefaultHandler dh)
          Parse the specified input source, reporting SAX2 events to the given handler.
 void parse(org.xml.sax.InputSource is, org.xml.sax.HandlerBase hb)
          Parse the specified input source, reporting SAX1 events to the given handler.
 void parse(java.io.InputStream is, org.xml.sax.helpers.DefaultHandler dh)
          Parse the specified input stream, reporting SAX2 events to the given handler.
 void parse(java.io.InputStream is, org.xml.sax.helpers.DefaultHandler dh, java.lang.String systemId)
          Parse the specified input stream, reporting SAX2 events to the given handler.
 void parse(java.io.InputStream is, org.xml.sax.HandlerBase hb)
          Parse the specifed input stream, reporting SAX1 events to the given handler.
 void parse(java.io.InputStream is, org.xml.sax.HandlerBase hb, java.lang.String systemId)
          Parse the specified input stream, reporting SAX1 events to the given handler.
 void parse(java.lang.String uri, org.xml.sax.helpers.DefaultHandler dh)
          Parse the content of the specified URI, reporting SAX2 events to the given handler.
 void parse(java.lang.String uri, org.xml.sax.HandlerBase hb)
          Parse the content of the specified URI, reporting SAX1 events to the given handler.
 void reset()
          Resets this parser to its original configuration.
abstract  void setProperty(java.lang.String name, java.lang.Object value)
          Sets the specified SAX2 parser property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAXParser

protected SAXParser()
Method Detail

parse

public void parse(java.io.InputStream is,
                  org.xml.sax.HandlerBase hb)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Parse the specifed input stream, reporting SAX1 events to the given handler. Prefer the SAX2 version of this method, since the HandlerBase class is now deprecated. Also prefer the version of this method that specifies a system ID, in order to resolve external references correctly.


parse

public void parse(java.io.InputStream is,
                  org.xml.sax.HandlerBase hb,
                  java.lang.String systemId)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Parse the specified input stream, reporting SAX1 events to the given handler. Prefer the SAX2 version of this method, since the HandlerBase class is now deprecated.


parse

public void parse(java.io.InputStream is,
                  org.xml.sax.helpers.DefaultHandler dh)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Parse the specified input stream, reporting SAX2 events to the given handler. Prefer the version of this method that specifies a system ID, in order to resolve external references correctly.


parse

public void parse(java.io.InputStream is,
                  org.xml.sax.helpers.DefaultHandler dh,
                  java.lang.String systemId)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Parse the specified input stream, reporting SAX2 events to the given handler.


parse

public void parse(java.lang.String uri,
                  org.xml.sax.HandlerBase hb)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Parse the content of the specified URI, reporting SAX1 events to the given handler. Prefer the SAX2 version of this method, since the HandlerBase class is now deprecated.


parse

public void parse(java.lang.String uri,
                  org.xml.sax.helpers.DefaultHandler dh)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Parse the content of the specified URI, reporting SAX2 events to the given handler.


parse

public void parse(java.io.File f,
                  org.xml.sax.HandlerBase hb)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Parse the content of the specified file, reporting SAX1 events to the given handler. Prefer the SAX2 version of this method, since the HandlerBase class is now deprecated.


parse

public void parse(java.io.File f,
                  org.xml.sax.helpers.DefaultHandler dh)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Parse the content of the specified file, reporting SAX2 events to the given handler.


parse

public void parse(org.xml.sax.InputSource is,
                  org.xml.sax.HandlerBase hb)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Parse the specified input source, reporting SAX1 events to the given handler. Prefer the SAX2 version of this method, since the HandlerBase class is now deprecated.


parse

public void parse(org.xml.sax.InputSource is,
                  org.xml.sax.helpers.DefaultHandler dh)
           throws org.xml.sax.SAXException,
                  java.io.IOException
Parse the specified input source, reporting SAX2 events to the given handler.


getParser

public abstract org.xml.sax.Parser getParser()
                                      throws org.xml.sax.SAXException
Returns the underlying SAX1 parser.


getXMLReader

public abstract org.xml.sax.XMLReader getXMLReader()
                                            throws org.xml.sax.SAXException
Returns the underlying SAX2 parser.

Since:
1.1

isNamespaceAware

public abstract boolean isNamespaceAware()
Indicates whether this parser is XML Namespace aware.


isValidating

public abstract boolean isValidating()
Indicates whether this parser will validate its input.


setProperty

public abstract void setProperty(java.lang.String name,
                                 java.lang.Object value)
                          throws org.xml.sax.SAXNotRecognizedException,
                                 org.xml.sax.SAXNotSupportedException
Sets the specified SAX2 parser property.


getProperty

public abstract java.lang.Object getProperty(java.lang.String name)
                                      throws org.xml.sax.SAXNotRecognizedException,
                                             org.xml.sax.SAXNotSupportedException
Returns the value of the specified SAX2 parser property.


reset

public void reset()
Resets this parser to its original configuration.

Since:
1.3

getSchema

public javax.xml.validation.Schema getSchema()
Returns the schema in use by this parser.

Since:
1.3

isXIncludeAware

public boolean isXIncludeAware()
Indicates whether this parser is XInclude-aware.

Since:
1.3