java.lang.Object | |
↳ | javax.xml.parsers.DocumentBuilder |
Defines a bridge from XML sources (files, stream etc.) to DOM trees. Can be
used for easily obtaining a Document
for the input. The
class itself is abstract. The class DocumentBuilderFactory
is able to
provide instances (of concrete subclasses known to the system).
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Do-nothing constructor.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Queries the DOM implementation this
DocumentBuilder is working
on. | |||||||||||
Queries whether the
DocumentBuilder has namespace support
enabled. | |||||||||||
Queries whether the
DocumentBuilder has validation support
enabled. | |||||||||||
Queries whether the
DocumentBuilder has XInclude support enabled. | |||||||||||
Creates a new, empty document, serving as the starting point for a DOM
tree.
| |||||||||||
Parses a given XML input stream and builds a DOM tree from it.
| |||||||||||
Parses an XML input stream from a given URI and builds a DOM tree from
it.
| |||||||||||
Parses a given XML file and builds a DOM tree from it.
| |||||||||||
Parses an XML input source and builds a DOM tree from it.
| |||||||||||
Parses a given XML input stream and builds a DOM tree from it.
| |||||||||||
Resets the DocumentBuilder to the same state is was in after its
creation.
| |||||||||||
Sets the
EntityResolver used for resolving entities encountered
during the parse process. | |||||||||||
Sets the
ErrorHandler used for dealing with errors encountered
during the parse process. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.lang.Object
|
Do-nothing constructor. Prevents instantiation. To be overridden by concrete subclasses.
Queries the DOM implementation this DocumentBuilder
is working
on.
Queries whether the DocumentBuilder
has namespace support
enabled.
true
if namespaces are turned on, false
otherwise.Queries whether the DocumentBuilder
has validation support
enabled.
true
if validation is turned on, false
otherwise.Queries whether the DocumentBuilder
has XInclude support enabled.
true
if XInclude support is turned on, false
otherwise.UnsupportedOperationException | if the underlying implementation doesn't support XInclude. |
---|
Creates a new, empty document, serving as the starting point for a DOM tree.
Parses a given XML input stream and builds a DOM tree from it.
stream | the stream to be parsed. |
---|
SAXException | if the XML parsing fails. |
---|---|
IOException | if an input/output error occurs. |
Parses an XML input stream from a given URI and builds a DOM tree from it.
uri | the URI to fetch the XML stream from. |
---|
SAXException | if the XML parsing fails. |
---|---|
IOException | if an input/output error occurs. |
Parses a given XML file and builds a DOM tree from it.
file | the file to be parsed. |
---|
SAXException | if the XML parsing fails. |
---|---|
IOException | if an input/output error occurs. |
Parses an XML input source and builds a DOM tree from it.
source | the input source to parse. |
---|
SAXException | if the XML parsing fails. |
---|---|
IOException | if an input/output error occurs. |
Parses a given XML input stream and builds a DOM tree from it.
stream | the stream to be parsed. |
---|---|
systemId | the base for resolving relative URIs. |
SAXException | if the XML parsing fails. |
---|---|
IOException | if an input/output error occurs. |
Resets the DocumentBuilder to the same state is was in after its creation.
Sets the EntityResolver
used for resolving entities encountered
during the parse process. Passing null
results in the
DocumentBuilder
's own EntityResolver
being used.
resolver | the EntityResolver to use, or null for the
built-in one. |
---|
Sets the ErrorHandler
used for dealing with errors encountered
during the parse process. Passing null
results in the
DocumentBuilder
's own ErrorHandler
being used.
handler | the ErrorHandler to use, or null for the
built-in one. |
---|