DocumentType in DOM Level 2 Core

The DocumentType interface represents general entities and notations declared in the document type definition

For more information see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-412266927.

Inherits from:

Instance Properties

name type description
attributes NamedNodeMap (read only) [from Node]
childNodes NodeList (read only) [from Node]
entities NamedNodeMap (read only)
firstChild Node (read only) [from Node]
internalSubset String (read only)
lastChild Node (read only) [from Node]
localName String (read only) [from Node]
name String (read only)
namespaceURI String (read only) [from Node]
nextSibling Node (read only) [from Node]
nodeName String (read only) [from Node]
nodeType Number (read only) [from Node]
nodeValue String [from Node]
notations NamedNodeMap (read only)
ownerDocument Document (read only) [from Node]
parentNode Node (read only) [from Node]
prefix String [from Node]
previousSibling Node (read only) [from Node]
publicId String (read only)
systemId String (read only)

Instance Methods

name returns description
addEventListener(type,listener,useCapture) (none) [from EventTarget]
appendChild(newChild) Node [from Node]
cloneNode(deep) Node Return a new copy of the node. [from Node]
dispatchEvent(evt) Boolean Dispatches an event to the invoking object. [from EventTarget]
hasAttributes() Boolean [from Node]
hasChildNodes() Boolean [from Node]
insertBefore(newChild,refChild) Node [from Node]
isSupported(feature,version) Boolean [from Node]
normalize() (none) [from Node]
removeChild(oldChild) Node [from Node]
removeEventListener(type,listener,useCapture) (none) [from EventTarget]
replaceChild(newChild,oldChild) Node [from Node]

Description

 

Each Document has a doctype attribute whose value is either null or a DocumentType object. The DocumentType interface in the DOM Core provides an interface to the list of entities that are defined for the document, and little else because the effect of namespaces and the various XML schema efforts on DTD representation are not clearly understood as of this writing.

The DOM Level 2 doesn't support editing DocumentType nodes.

Properties that are a DocumentType

name object description
doctype Document (read only)

Methods that return a DocumentType

name of object description
createDocumentType(qualifiedName,publicId,systemId) DOMImplementation

Arguments that are a DocumentType

name in method of object description
doctype createDocument(namespaceURI,qualifiedName,doctype) DOMImplementation