Defines the API to obtain DOM Document instances from an XML
document. Using this class, an application programmer can obtain a
org.w3c.dom.Document from XML.
An instance of this class can be obtained from the
javax.xml.parsers.DocumentBuilderFactory.newDocumentBuilderDocumentBuilderFactory.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.
An implementation of DocumentBuilder is NOT
guaranteed to behave as per the specification if it is used concurrently by
two or more threads. It is recommended to have one instance of the
DocumentBuilder per thread or it is upto the application to
make sure about the use of DocumentBuilder from more than one
thread.
since: JAXP 1.0 version: 1.0 |