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

java.lang.Object
  |
  +--net.rim.device.api.xml.parsers.SAXParserFactory

public abstract class SAXParserFactory
extends Object

A factory to configure and create SAXParser instances.

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 SAXParserFactory()
           
 
Method Summary
 boolean getAllowUndefinedNamespaces()
          Determines whether this factory is configured to produce parsers that allow undefined namespaces.
 boolean isNamespaceAware()
          Determines whether this factory is configured to produce parsers that support namespaces
 boolean isValidating()
          Determines whether this factory is configured to produce parsers that validate XML documents.
static SAXParserFactory newInstance()
          Creates a new SAXParserFactory object.
abstract  SAXParser newSAXParser()
          Creates a new SAXParser object using the currently configuration.
 void setAllowUndefinedNamespaces(boolean allow)
          Configures parsers produced by this factory to allow undefined namespaces.
 void setNamespaceAware(boolean aware)
          Configures parsers produced by this factory to support namespaces.
 void setValidating(boolean validate)
          Configures parsers produced by this factory to validate XML documents.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAXParserFactory

protected SAXParserFactory()
Since:
JDE 4.0.0
Method Detail

getAllowUndefinedNamespaces

public boolean getAllowUndefinedNamespaces()
Determines whether this factory is configured to produce parsers that allow undefined namespaces.
Returns:
True if this factory is configured to produce parsers that allow undefined namespaces, false otherwise.
Since:
JDE 4.0.0

isNamespaceAware

public boolean isNamespaceAware()
Determines whether this factory is configured to produce parsers that support namespaces
Returns:
True if this factory is configured to produce parsers that support namespaces, false otherwise.
Since:
JDE 4.0.0

isValidating

public boolean isValidating()
Determines whether this factory is configured to produce parsers that validate XML documents.
Returns:
True if this factory is configured to produce parsers that validate XML documents, false otherwise.
Since:
JDE 4.0.0

newInstance

public static SAXParserFactory newInstance()
Creates a new SAXParserFactory object.
Returns:
A new SAXParserFactory object.
Since:
JDE 4.0.0

newSAXParser

public abstract SAXParser newSAXParser()
                                throws ParserConfigurationException,
                                       SAXException
Creates a new SAXParser object using the currently configuration.
Returns:
A new SAXParser object.
Throws:
ParserConfigurationException - Thrown when a parser cannot be created with the current parameters.
Since:
JDE 4.0.0

setAllowUndefinedNamespaces

public void setAllowUndefinedNamespaces(boolean allow)
Configures parsers produced by this factory to allow undefined namespaces.
Parameters:
allow - True to configure parsers produced by this factory to allow undefined namespaces, false otherwise.
Since:
JDE 4.0.0

setNamespaceAware

public void setNamespaceAware(boolean aware)
Configures parsers produced by this factory to support namespaces. By default, parsers produced by this factory support namespaces (true).
Parameters:
aware - True to configure parsers produced by this factory to support namespaces, false otherwise.
Since:
JDE 4.0.0

setValidating

public void setValidating(boolean validate)
Configures parsers produced by this factory to validate XML documents. By default, parsers produced by this factory do not validate XML documents (false).
Parameters:
validate - True to configure parsers produced by this factory to validate XML documents, false otherwise.
Since:
JDE 4.0.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.