ZVON > References > DOM2 Reference

createDocumentType (method )

Owning interface and usage:  
DOMImplementation.createDocumentType(qualifiedName, publicId, systemId)

Member of these other interfaces:  
none

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.
DOMException NOT_SUPPORTED_ERR
May be raised if the implementation does not support the feature "XML" and the language exposed through the Document does not support XML Namespaces (such as [HTML4]).

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.


Example: