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

java.lang.Object
  extended by net.rim.device.api.xml.parsers.DocumentBuilderFactory

public abstract class DocumentBuilderFactory
extends Object

A factory to produce DocumentBuilder objects.

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 DocumentBuilderFactory()
           
 
Method Summary
 boolean getAllowUndefinedNamespaces()
          Determines whether this factory is configured to produce parsers that allow undefined namespaces.
 boolean isCoalescing()
          Determines whether this factory is configured to produce parsers that convert CDATA nodes to Text nodes and merge adjacent Text nodes.
 boolean isExpandEntityReferences()
          Determines whether this factory is configured to produce parsers that expand entity references.
 boolean isIgnoringComments()
          Determines whether this factory is configured to produce parsers that ignore comments.
 boolean isIgnoringElementContentWhitespace()
          Determines whether this factory is configured to produce parsers that eliminate ignorable whitespace.
 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 documents.
abstract  DocumentBuilder newDocumentBuilder()
          Creates a new DocumentBuilder object using the current parameters.
static DocumentBuilderFactory newInstance()
          Creates a new DocumentBuilderFactory object.
 void setAllowUndefinedNamespaces(boolean allow)
          Configures parsers produced by this factory to allow undefined namespaces.
 void setCoalescing(boolean coalesce)
          Configures parsers produced by this factory to convert CDATA nodes to Text nodes and to merge adjacent Text nodes.
 void setExpandEntityReferences(boolean expand)
          Configures parsers produced by this factory to expand entity references.
 void setIgnoringComments(boolean ignoreComments)
          Configures parsers produced by this factory to ignore comments.
 void setIgnoringElementContentWhitespace(boolean ignore)
          Configures parsers produced by this factory to eliminate ignorable whitespace when parsing documents.
 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 documents.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Constructor Detail

DocumentBuilderFactory

protected DocumentBuilderFactory()
Since:
BlackBerry API 4.0.0


Method Detail

newInstance

public static DocumentBuilderFactory newInstance()
Creates a new DocumentBuilderFactory object.

Returns:
A new DocumentBuilderFactory object.
Since:
BlackBerry API 4.0.0

newDocumentBuilder

public abstract DocumentBuilder newDocumentBuilder()
                                            throws ParserConfigurationException
Creates a new DocumentBuilder object using the current parameters.

Returns:
A new DocumentBuilder object.
Throws:
ParserConfigurationException - Thrown when a DocumentBuilder cannot be created using the current parameters.
Since:
BlackBerry API 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:
BlackBerry API 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:
BlackBerry API 4.0.0

setValidating

public void setValidating(boolean validate)
Configures parsers produced by this factory to validate documents. By default, parsers produced by this factory do not validate documents (false).

Parameters:
validate - True if parsers produced by this factory should validate documents, false otherwise.
Since:
BlackBerry API 4.0.0

isValidating

public boolean isValidating()
Determines whether this factory is configured to produce parsers that validate documents.

Returns:
True if this factory is configured to produce parsers that validate documents, false otherwise.
Since:
BlackBerry API 4.0.0

setIgnoringElementContentWhitespace

public void setIgnoringElementContentWhitespace(boolean ignore)
Configures parsers produced by this factory to eliminate ignorable whitespace when parsing documents. This setting requires parsers to be in validating mode. By default, parsers produced by this factory do not eliminate ignorable whitespace (false).

Parameters:
ignore - True if parsers produced by this factory should eliminate ignorable whitespace, false otherwise.
Since:
BlackBerry API 4.0.0

isIgnoringElementContentWhitespace

public boolean isIgnoringElementContentWhitespace()
Determines whether this factory is configured to produce parsers that eliminate ignorable whitespace.

Returns:
True if this factory is configured to produce parsers that eliminate ignorable whitespace, false otherwise.
Since:
BlackBerry API 4.0.0

setExpandEntityReferences

public void setExpandEntityReferences(boolean expand)
Configures parsers produced by this factory to expand entity references. By default, parsers produced by this factory expand entity references (true).

Parameters:
expand - True to produce parsers that expand entity references, false otherwise.
Since:
BlackBerry API 4.0.0

isExpandEntityReferences

public boolean isExpandEntityReferences()
Determines whether this factory is configured to produce parsers that expand entity references.

Returns:
True if this factory is configured to produce parsers that expand entity references, false otherwise.
Since:
BlackBerry API 4.0.0

setIgnoringComments

public void setIgnoringComments(boolean ignoreComments)
Configures parsers produced by this factory to ignore comments. By default, parsers produced by this factory do not ignore comments (false).

Since:
BlackBerry API 4.0.0

isIgnoringComments

public boolean isIgnoringComments()
Determines whether this factory is configured to produce parsers that ignore comments.

Returns:
True if this factory is configured to produce parsers that ignore comments, false otherwise.
Since:
BlackBerry API 4.0.0

setCoalescing

public void setCoalescing(boolean coalesce)
Configures parsers produced by this factory to convert CDATA nodes to Text nodes and to merge adjacent Text nodes. By default, parsers produced by this factory do not convert CDATA nodes to Text nodes and do not merge adjacent Text nodes (false).

Parameters:
coalesce - True to configure this factory to produce parsers that convert CDATA nodes to Text nodes and merge adjacent Text nodes, false otherwise.
Since:
BlackBerry API 4.0.0

isCoalescing

public boolean isCoalescing()
Determines whether this factory is configured to produce parsers that convert CDATA nodes to Text nodes and merge adjacent Text nodes.

Returns:
True if this factory is configured to produce parsers that convert CDATA nodes to Text nodes and merge adjacent Text nodes, false otherwise.
Since:
BlackBerry API 4.0.0

setAllowUndefinedNamespaces

public void setAllowUndefinedNamespaces(boolean allow)
Configures parsers produced by this factory to allow undefined namespaces.

Parameters:
allow - True if parsers produced by this factory allow undefined namespaces, false otherwise.
Since:
BlackBerry API 4.0.0

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:
BlackBerry API 4.0.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