XML technologies / XML / XML in a Nutshell / The Document Object Model (DOM) / The interface DOMImplementation

(Excerpt from "XML in a Nutshell" by Elliotte Rusty Harold & W. Scott Means)

The interface DOMImplementation could be regarded as the highest interface level in DOM. It contains the method hasFeature( ), which allows a programmer using a given DOM implementation to determine whether certain capabilities are available. DOM Level 2 also introduces the ability to create new nodes of type DocumentType, which can in turn be used to create new Document instances.

The only method added to the interface DOMImplementation in Level 3 is the method getFeature( ). This method allows DOM implementers to provide access, through extension objects, to additional functionality outside the DOM specification itself. These objects implement the interface DOMObject, which is usually mapped to the general object type (for example, the Java-Object) of the underlying programming language, assuming that the language is object-oriented. The following table describes the interface DomImplementation.

Table: the DOMImplementation interface

Name

Type

2.0

3.0

Methoden

createDocument

Document

✗

createDocumentType

DocumentType

✗

getFeature

DOMObject

✗

hasFeature

boolean

  

 

 

 

back to top