DOMImplementation


DOMImplementation org.w3c.dom

Java 1.4

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 verion "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( ) object. 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  createDocumentType  (String  qualifiedName  , String  publicId  ,          String  systemId  ) throws DOMException;  5.0  Object  getFeature  (String  feature  , String  version  );        boolean  hasFeature  (String  feature  , String  version  );   } 

Returned By

javax.xml.parsers.DocumentBuilder.getDOMImplementation( ) , Document.getImplementation( ) , DOMImplementationList.item( ) , DOMImplementationSource.getDOMImplementation( )



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

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