DOM2 Reference
| Reference Search | Sitemap | XML Glossary |       ZVON | IDOOX

DOMImplementation

Type of the interface: fundamental
Own properties:
attributes -  none
methods -  createDocument, createDocumentType, hasFeature

Description:
The DOMImplementation interface provides a number of methods for performing operations that are independent of any particular instance of the document object model.




 method:    DOMImplementation.createDocument(namespaceURI, qualifiedName, doctype)      example  
description: Creates an XML Document object of the specified type with its document element.
parameters:
DOMString namespaceURI  -  The namespace URI of the document element to create.
DOMString qualifiedName  -  The qualified name of the document element to be created.
DocumentType doctype  -  The type of document to be created or null. (When doctype is not null, its Node.ownerDocument attribute is set to the document being created.)
returns:
Document  -  A new Document object.
exceptions:
DOMException INVALID_CHARACTER_ERR  -  Raised if the specified qualified name contains an illegal character.
DOMException NAMESPACE_ERR  -  Raised if the qualifiedName is malformed, if the qualifiedName has a prefix and the namespaceURI is null, or if the qualifiedName has a prefix that is "xml" and the namespaceURI is different from "http://www.w3.org/XML/1998/namespace".
DOMException WRONG_DOCUMENT_ERR  -  Raised if doctype has already been used with a different document or was created from a different implementation.

 method:    DOMImplementation.createDocumentType(qualifiedName, publicId, systemId)      example  
description: Creates an empty DocumentType node.
parameters:
DOMString qualifiedName  -  The qualified name of the document type to be created.
DOMString publicId  -  The external subset public identifier.
DOMString systemId  -  The external subset system identifier.
returns:
DocumentType  -  A new DocumentType node with Node.ownerDocument set to null.
exceptions:
DOMException INVALID_CHARACTER_ERR  -  Raised if the specified qualified name contains an illegal character.
DOMException NAMESPACE_ERR  -  Raised if the qualifiedName is malformed.
note: Entity declarations and notations are not made available. Entity reference expansions and default attribute additions do not occur. It is expected that a future version of the DOM will provide a way for populating a DocumentType.

 method:    DOMImplementation.hasFeature(feature, version)      example  
description: Test if the DOM implementation implements a specific feature.
parameters:
DOMString feature  -  The name of the feature to test (case-insensitive).
DOMString version  -  This is the version number of the feature to test. In Level 2, the string can be either "2.0" or "1.0". If the version is not specified, supporting any version of the feature causes the method to return true.
returns:
Boolean  -  true if the feature is implemented in the specified version, false otherwise.
exceptions:  none