net.rim.device.api.xml.parsers
Class SAXParser

java.lang.Object
  |
  +--net.rim.device.api.xml.parsers.SAXParser
Direct Known Subclasses:
SAXParserImpl, XMLParser

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.0.0

Constructor Summary
protected SAXParser()
           
 
Method Summary
abstract  boolean getAllowUndefinedNamespaces()
          Determines whether this parser allows undefined namespaces.
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.
abstract  void setAllowUndefinedNamespaces(boolean allow)
          Configures this parser to allow or disallow undefined namespaces.
abstract  void setNamespaceAware(boolean aware)
          Configures this parser to be namespace aware or not.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAXParser

protected SAXParser()
Since:
JDE 4.0.0
Method Detail

getAllowUndefinedNamespaces

public abstract boolean getAllowUndefinedNamespaces()
Determines whether this parser allows undefined namespaces.
Returns:
True if this parser allows undfined namespaces, false otherwise.
Since:
JDE 4.0.0

isNamespaceAware

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

isValidating

public abstract boolean isValidating()
Determines whether this parser validates documents.
Returns:
True if this parser validatates documents, false otherwise.
Since:
JDE 4.0.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.0.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.0.0

setAllowUndefinedNamespaces

public abstract void setAllowUndefinedNamespaces(boolean allow)
Configures this parser to allow or disallow undefined namespaces.
Parameters:
allow - True to configure this parser to allow undefined namespaces, false otherwise.
Since:
JDE 4.0.0

setNamespaceAware

public abstract void setNamespaceAware(boolean aware)
Configures this parser to be namespace aware or not.
Parameters:
aware - True to configure this parser to be namespace aware; false otherwise.
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.