19.5 The DOMImplementation Interface

   

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

figs/check.gif  

createDocumentType

DocumentType

figs/check.gif  

getFeature

DOMObject

  figs/check.gif

hasFeature

boolean

   



XML in a Nutshell
XML in a Nutshell, Third Edition
ISBN: 0596007647
EAN: 2147483647
Year: 2003
Pages: 232

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net