javax.xml.parsers
Class SAXParser

java.lang.Object
  extended by 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:
BlackBerry API 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(InputStream is, DefaultHandler dh)
          Parses the given InputStream.
abstract  void parse(InputSource is, DefaultHandler dh)
          Parses the given InputSource.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

SAXParser

protected SAXParser()
Since:
BlackBerry API 4.3.0


Method Detail

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:
BlackBerry API 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:
BlackBerry API 4.3.0

isNamespaceAware

public abstract boolean isNamespaceAware()
Determines whether this parser understands namespaces.

Returns:
True if this parser understands namespaces, false otherwise.
Since:
BlackBerry API 4.3.0

isValidating

public abstract boolean isValidating()
Determines whether this parser validates documents.

Returns:
True if this parser validatates documents, false otherwise.
Since:
BlackBerry API 4.3.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal