DocumentBuilder (Java SE 11 & JDK 11 ) (original) (raw)

public abstract class DocumentBuilder
extends Object
Defines the API to obtain DOM Document instances from an XML document. Using this class, an application programmer can obtain aDocument from XML.
An instance of this class can be obtained from theDocumentBuilderFactory.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 aDocument. It merely requires that the implementation communicate with the application using these existing APIs.
Since:
1.4

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.