XML in a Nutshell, Third Edition

   

The DOMImplementation interface could be considered the highest level interface in the DOM. It exposes the hasFeature( ) method, which allows a programmer using a given DOM implementation to detect if specific features are available. In DOM Level 2, it introduced facilities for creating new DocumentType nodes, which can then be used to create new Document instances.

The only method added to the DOMImplementation interface for Level 3 was the getFeature( ) method. This method allows DOM implementers to provide access to extended functionality, which is not part of the DOM specification itself, through the use of extension objects. These objects implement the DOMObject interface, which generally maps to the generic object (e.g., the Java Object ) type in the underlying programming language (if the language is object-oriented).Table 19-15 describes the DomImplementation interface.

Table 19-15. The DOMImplementation interface

Name

Type

2.0

3.0

Methods

     

createDocument

Document

 

createDocumentType

DocumentType

 

getFeature

DOMObject

 

hasFeature

boolean

   

Категории