The DocumentTypeNode
class extends AbstractNode
and represents the document type declaration (<!DOCTYPE ...>
) in an HTML or XML document. It defines the document's type (e.g., html
, svg
) and can contain public and system identifiers, particularly in XML documents to reference external DTDs.
As a subclass of AbstractNode, it inherits the basic node properties and methods from AbstractNode
, such as structure manipulation, but with specific properties and methods tailored for document type nodes. It does not participate in rendering or child node relationships, as its primary role is in defining the document's type.
The DocumentTypeNode
allows access to the document type declaration information, while maintaining compatibility with the DOM structure defined by AbstractNode
.
Declaration
class DocumentTypeNode extends AbstractNode
inherited methods
- appendChild
- clearChildNodes
- cloneNode
- getChild
- getChildNodes
- getFirstChild
- getLastChild
- getNextSibling
- getNodeId
- getNodeName
- getNodeType
- getParentElement
- getParentElements
- getParentNode
- getParentNodes
- getPreviousSibling
- hasChild
- hasSibling
- insertAfter
- insertBefore
- insertChildAtPosition
- isVisible
- moveAfterSibling
- moveBeforeSibling
- moveToFirstSibling
- moveToLastSibling
- moveToSiblingPosition
- prependChild
- removeChild
- render
- replaceChild
- setVisible
- sortChildNodes
- toJson