Name
DOMImplementation
Synopsis
This interface defines methods that are
global to an implementation of the DOM rather than specific to a
particular Document
object. Obtain a reference to
the DOMImplementation
object that represents your
implementation by calling the getImplementation( )
method of any Document
object.
createDocument( )
returns a new, empty
Document
object which you can populate with nodes
that you create using the create
methods defined
by the Document
interface.
hasFeature( )
allows you to test whether your DOM
implementation supports a specified version of a named feature, or
module, of the DOM standard. This method should return
true
when you pass the feature name
“core” and the version
“1.0”, or when you pass the feature
names “core” or
“xml” and the version
“2.0”. The DOM standard includes a
number of optional modules, but the Java platform has not adopted the
subpackages of this package that define the API for those optional
modules, and therefore the DOM implementation bundled with a Java
implementation is not likely to support those modules.
The javax.xml.parsers.DocumentBuilder
class
provides another way to obtain the
DOMImplementation
object by calling its
getDOMImplementation( )
method. It also defines a
shortcut newDocument( )
method for creating empty
Document
objects to populate.
public interface DOMImplementation { // Public Instance Methods Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype) throws DOMException; DocumentType ...
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.