Document from XML.
An instance of this class can be obtained from the
DocumentBuilderFactory#newDocumentBuilder() method. Once
an instance of this class is obtained, XML can be parsed from a
variety of input sources. These input sources are InputStreams,
Files, URLs, and SAX InputSources.
Note that this class reuses several classes from the SAX API. This
does not require that the implementor of the underlying DOM
implementation use a SAX parser to parse XML document into a
Document. It merely requires that the implementation
communicate with the application using these existing APIs.
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract DOMImplementation | Returns: A new instance of aDOMImplementation.Obtain an instance of a |
| public Schema | |
| public abstract boolean | Returns: true if this parser is configured to understand namespaces; false otherwise.Indicates whether or not this parser is configured to understand namespaces. |
| public abstract boolean | Returns: true if this parser is configured to validate XML documents; false otherwise.Indicates whether or not this parser is configured to validate XML documents. |
| public boolean | Returns: the return value of theDocumentBuilderFactory#isXIncludeAware()
when this parser was created from factory.Get the XInclude processing mode for this parser. |
| public abstract Document | Returns: A new instance of a DOM Document object.Obtain a new instance of a DOM |
| public Document | Returns: Document result of parsing the
InputStreamInputStream containing the content to be parsed. is)Parse the content of the given |
| public Document | Returns: A new DOM Document object.InputStream containing the content to be parsed. is, String Provide a base for resolving relative URIs. systemId)Parse the content of the given |
| public Document | |
| public Document | |
| public abstract Document | Returns: A new DOM Document object.InputSource containing the content to be parsed. is)Parse the content of the given input source as an XML document
and return a new DOM |
| public void | |
| public abstract void | setEntityResolver(EntityResolver
The er)EntityResolver to be used to resolve entities
present in the XML document to be parsed.Specify the |
| public abstract void | setErrorHandler(ErrorHandler
The eh)ErrorHandler to be used by the parser.Specify the |
| DocumentBuilder | back to summary |
|---|---|
| protected DocumentBuilder() Protected constructor | |
| getDOMImplementation | back to summary |
|---|---|
| public abstract DOMImplementation getDOMImplementation() Obtain an instance of a
| |
| getSchema | back to summary |
|---|---|
| public Schema getSchema() Get a reference to the If no schema is being used,
| |
| isNamespaceAware | back to summary |
|---|---|
| public abstract boolean isNamespaceAware() Indicates whether or not this parser is configured to understand namespaces.
| |
| isValidating | back to summary |
|---|---|
| public abstract boolean isValidating() Indicates whether or not this parser is configured to validate XML documents.
| |
| isXIncludeAware | back to summary |
|---|---|
| public boolean isXIncludeAware() Get the XInclude processing mode for this parser.
| |
| newDocument | back to summary |
|---|---|
| public abstract Document newDocument() Obtain a new instance of a DOM
| |
| parse | back to summary |
|---|---|
| public Document parse(InputStream is) throws SAXException, IOException Parse the content of the given
| |
| parse | back to summary |
|---|---|
| public Document parse(InputStream is, String systemId) throws SAXException, IOException Parse the content of the given
| |
| parse | back to summary |
|---|---|
| public Document parse(String uri) throws SAXException, IOException Parse the content of the given URI as an XML document
and return a new DOM
| |
| parse | back to summary |
|---|---|
| public Document parse(File f) throws SAXException, IOException Parse the content of the given file as an XML document
and return a new DOM
| |
| parse | back to summary |
|---|---|
| public abstract Document parse(InputSource is) throws SAXException, IOException Parse the content of the given input source as an XML document
and return a new DOM
| |
| reset | back to summary |
|---|---|
| public void reset() Reset this
The reset
| |
| setEntityResolver | back to summary |
|---|---|
| public abstract void setEntityResolver(EntityResolver er) Specify the
| |
| setErrorHandler | back to summary |
|---|---|
| public abstract void setErrorHandler(ErrorHandler eh) Specify the
| |