Document
interface in package org.w3c.dom

    public interface Document extends Node:

Node
└ Document

DOM document node.

    import org.w3c.dom

    root = document.createElement("root")
    document.appendChild(root)

Attributes inherited from Node: ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
Properties

Modifier and Type | Member | Description
--- | --- | ---
public readonly property | doctype `doctype as DocumentType` | Document type declaration associated with this document.
public readonly property | documentElement `documentElement as Element` | Root element of the document.
public property | documentURI `documentURI as String` | Document URI.
public readonly property | domConfig `domConfig as DOMConfiguration` | DOM configuration object used by normalizeDocument.
public readonly property | implementation `implementation as DOMImplementation` | DOM implementation that created this document.
public readonly property | inputEncoding `inputEncoding as String` | Input character encoding, when known.
public property | strictErrorChecking `strictErrorChecking as Boolean` | Enables or disables strict DOM error checking.
public readonly property | xmlEncoding `xmlEncoding as String` | XML encoding, when known.
public property | xmlStandalone `xmlStandalone as Boolean` | XML standalone flag.
public property | xmlVersion `xmlVersion as String` | XML version string.

Properties inherited from Node: attributes, baseURI, childNodes, firstChild, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, ownerDocument, parentNode, prefix, previousSibling, textContent
Methods

Modifier and Type | Member | Description
--- | --- | ---
public | adoptNode `adoptNode(source as Node) as Node throws DOMException` | Adopts a node into this document.
public | createAttribute `createAttribute(name as String) as Attr throws DOMException` | Creates an attribute node.
public | createAttributeNS `createAttributeNS(namespaceURI as String, qualifiedName as String) as Attr throws DOMException` | Creates a namespace-aware attribute.
public | createCDATASection `createCDATASection(data as String) as CDATASection throws DOMException` | Creates a CDATA section node.
public | createComment `createComment(data as String) as Comment` | Creates a comment node.
public | createDocumentFragment `createDocumentFragment() as DocumentFragment` | Creates a document fragment.
public | createElement `createElement(tagName as String) as Element throws DOMException` | Creates an element with the given tag name.
public | createElementNS `createElementNS(namespaceURI as String, qualifiedName as String) as Element throws DOMException` | Creates a namespace-aware element.
public | createEntityReference `createEntityReference(name as String) as EntityReference throws DOMException` | Creates an entity reference node.
public | createProcessingInstruction `createProcessingInstruction(target as String, data as String) as ProcessingInstruction throws DOMException` | Creates a processing instruction node.
public | createTextNode `createTextNode(data as String) as Text` | Creates a text node.
public | getElementById `getElementById(elementId as String) as Element` | Returns the element marked with the given identifier.
public | getElementsByTagName `getElementsByTagName(tagName as String) as NodeList` | Returns descendant elements matching the tag name.
public | getElementsByTagNameNS `getElementsByTagNameNS(namespaceURI as String, localName as String) as NodeList` | Returns descendant elements matching namespace URI and local name.
public | importNode `importNode(importedNode as Node, deep as Boolean) as Node throws DOMException` | Imports a node into this document.
public | normalizeDocument `normalizeDocument() as Void` | Normalizes this document according to its DOM configuration.
public | renameNode `renameNode(node as Node, namespaceURI as String, qualifiedName as String) as Node throws DOMException` | Renames a node.

Methods inherited from Node: appendChild, cloneNode, compareDocumentPosition, getAttribute, getFeature, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setUserData