public interface Document extends Node:
DOM document node.
import org.w3c.dom
root = document.createElement("root")
document.appendChild(root)| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | doctypedoctype as DocumentType |
Document type declaration associated with this document. |
| public readonly property | documentElementdocumentElement as Element |
Root element of the document. |
| public property | documentURIdocumentURI as String |
Document URI. |
| public readonly property | domConfigdomConfig as DOMConfiguration |
DOM configuration object used by normalizeDocument. |
| public readonly property | implementationimplementation as DOMImplementation |
DOM implementation that created this document. |
| public readonly property | inputEncodinginputEncoding as String |
Input character encoding, when known. |
| public property | strictErrorCheckingstrictErrorChecking as Boolean |
Enables or disables strict DOM error checking. |
| public readonly property | xmlEncodingxmlEncoding as String |
XML encoding, when known. |
| public property | xmlStandalonexmlStandalone as Boolean |
XML standalone flag. |
| public property | xmlVersionxmlVersion as String |
XML version string. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | adoptNodeadoptNode(source as Node) as Node throws DOMException |
Adopts a node into this document. |
| public | createAttributecreateAttribute(name as String) as Attr throws DOMException |
Creates an attribute node. |
| public | createAttributeNScreateAttributeNS(namespaceURI as String, qualifiedName as String) as Attr throws DOMException |
Creates a namespace-aware attribute. |
| public | createCDATASectioncreateCDATASection(data as String) as CDATASection throws DOMException |
Creates a CDATA section node. |
| public | createComment | Creates a comment node. |
| public | createDocumentFragmentcreateDocumentFragment() as DocumentFragment |
Creates a document fragment. |
| public | createElementcreateElement(tagName as String) as Element throws DOMException |
Creates an element with the given tag name. |
| public | createElementNScreateElementNS(namespaceURI as String, qualifiedName as String) as Element throws DOMException |
Creates a namespace-aware element. |
| public | createEntityReferencecreateEntityReference(name as String) as EntityReference throws DOMException |
Creates an entity reference node. |
| public | createProcessingInstructioncreateProcessingInstruction(target as String, data as String) as ProcessingInstruction throws DOMException |
Creates a processing instruction node. |
| public | createTextNode | Creates a text node. |
| public | getElementById | Returns the element marked with the given identifier. |
| public | getElementsByTagName | Returns descendant elements matching the tag name. |
| public | getElementsByTagNameNS | Returns descendant elements matching namespace URI and local name. |
| public | importNodeimportNode(importedNode as Node, deep as Boolean) as Node throws DOMException |
Imports a node into this document. |
| public | normalizeDocumentnormalizeDocument() as Void |
Normalizes this document according to its DOM configuration. |
| public | renameNoderenameNode(node as Node, namespaceURI as String, qualifiedName as String) as Node throws DOMException |
Renames a node. |