|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.xml.parsers.DocumentBuilder
public abstract class DocumentBuilder
Obtains Document instances from XML documents.
Retrieve an instance of this class from
DocumentBuilderFactory.
Note: This class is not thread-safe. Applications must serialize access to this class if two or more threads access the same instance.
| Constructor Summary | ||
|---|---|---|
protected |
DocumentBuilder()
|
|
| Method Summary | ||
|---|---|---|
abstract boolean |
getAllowUndefinedNamespaces()
Determines whether the underlying parser is configured to allow undefined namespaces. |
|
abstract DOMImplementation |
getDOMImplementation()
Retrieves a DOMImplementation object. |
|
abstract boolean |
isNamespaceAware()
Determines whether the underlying parser allows namespaces. |
|
abstract boolean |
isValidating()
Determines whether the underlying parser validates XML documents. |
|
abstract Document |
newDocument()
Creates an empty Document object. |
|
Document |
parse(InputStream is)
Parses the content of the InputStream
parameter and returns a new
Document object. |
|
Document |
parse(InputStream is,
String systemId)
Parses the content of the InputStream
parameter and returns a new
Document object. |
|
abstract Document |
parse(InputSource is)
Parses the content of the InputSource
parameter and returns a new
Document object. |
|
abstract void |
setAllowUndefinedNamespaces(boolean allow)
Configures the underlying parser to allow or disallow undefined namespaces. |
|
abstract void |
setEntityResolver(EntityResolver er)
Registers the EntityResolver to use to resolve entities. |
|
abstract void |
setErrorHandler(ErrorHandler eh)
Registers the ErrorHandler to use if an
error occurs while parsing the XML document. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DocumentBuilder()
| Method Detail |
|---|
public Document parse(InputStream is)
throws SAXException,
IOException
InputStream
parameter and returns a new
Document object.
is - Input stream to parse.
Document object.
IOException - Thrown when an IO error occurs.
IllegalArgumentException - Thrown when the input stream is null.
SAXException - Thrown when a SAX parsing error occurs.
public Document parse(InputStream is,
String systemId)
throws SAXException,
IOException
InputStream
parameter and returns a new
Document object.
is - Input stream to parse.systemId - Base for resolving relative URIs.
Document object.
SAXException - Thrown when a SAX parse error occurs.
IOException - Thrown when an IO error occurs.
IllegalArgumentException - Thrown when the input stream is null.
public abstract Document parse(InputSource is)
throws IOException,
SAXException
InputSource
parameter and returns a new
Document object.
is - Input source to parse.
Document object.
IOException - Thrown when an IO error occurs.
SAXException - Thrown when a SAX parse error occurs.
IllegalArgumentException - Thrown when the input source is null.public abstract boolean isNamespaceAware()
public abstract boolean isValidating()
public abstract void setEntityResolver(EntityResolver er)
EntityResolver to use to resolve entities.
er - The EntityResolver to use to resolve entities,
or null to use the default
EntityResolver.public abstract void setErrorHandler(ErrorHandler eh)
ErrorHandler to use if an
error occurs while parsing the XML document.
eh - The ErrorHandler to use if an
error occurs while parsing the XML document, or null to use
the default ErrorHandler.public abstract Document newDocument()
Document object.
Document object.public abstract DOMImplementation getDOMImplementation()
DOMImplementation object.
DOMImplementation object.public abstract boolean getAllowUndefinedNamespaces()
public abstract void setAllowUndefinedNamespaces(boolean allow)
allow - True to configure the underlying parser to allow
undefined namespaces, false otherwise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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