javax.xml.parsers
Class SAXParser

java.lang.Object
  |
  +--javax.xml.parsers.SAXParser
Direct Known Subclasses:
RIMSAXParser

public abstract class SAXParser
extends Object

Parses XML documents.

Note: This class is not thread-safe. Applications must serialize access to this class if two or more threads access the same instance.

Since:
JDE 4.3.0

Constructor Summary
protected SAXParser()
           
 
Method Summary
abstract  boolean isNamespaceAware()
          Determines whether this parser understands namespaces.
abstract  boolean isValidating()
          Determines whether this parser validates documents.
abstract  void parse(InputSource is, DefaultHandler dh)
          Parses the given InputSource.
abstract  void parse(InputStream is, DefaultHandler dh)
          Parses the given InputStream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAXParser

protected SAXParser()
Since:
JDE 4.3.0
Method Detail

isNamespaceAware

public abstract boolean isNamespaceAware()
Determines whether this parser understands namespaces.
Returns:
True if this parser understands namespaces, false otherwise.
Since:
JDE 4.3.0

isValidating

public abstract boolean isValidating()
Determines whether this parser validates documents.
Returns:
True if this parser validatates documents, false otherwise.
Since:
JDE 4.3.0

parse

public abstract void parse(InputSource is,
                           DefaultHandler dh)
                    throws SAXException,
                           IOException
Parses the given InputSource.
Parameters:
is - Input stream to parse.
dh - The SAX DefaultHandler to call.
Throws:
IOException - Thrown when an IO error occurs.
IllegalArgumentException - Thrown when InputStream is null.
SAXException - Thrown when the underlying parser throws a SAXException.
Since:
JDE 4.3.0

parse

public abstract void parse(InputStream is,
                           DefaultHandler dh)
                    throws SAXException,
                           IOException
Parses the given InputStream.
Parameters:
is - Input stream to parse.
dh - The SAX DefaultHandler to call.
Throws:
IOException - Thrown when an IO error occurs.
IllegalArgumentException - Thrown when InputStream is null.
SAXException - Thrown when the underlying parser throws a SAXException.
Since:
JDE 4.3.0



Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.