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

java.lang.Object
  extended by 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:
BlackBerry API 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(InputStream is, DefaultHandler dh)
          Parses the given InputStream.
abstract  void parse(InputSource is, DefaultHandler dh)
          Parses the given InputSource.
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:
BlackBerry API 4.0.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.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:
BlackBerry API 4.0.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.0.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.0.0

getAllowUndefinedNamespaces

public abstract boolean getAllowUndefinedNamespaces()
Determines whether this parser allows undefined namespaces.

Returns:
True if this parser allows undfined namespaces, false otherwise.
Since:
BlackBerry API 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:
BlackBerry API 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:
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