DOMDocument
class in package klyn.io.xml.dom

    public class DOMDocument extends XMLDocument:

Object
└ XMLNode
└ XMLDocument
└ DOMDocument

DOM document returned by `DOMParser`.

`DOMDocument` is an `XMLDocument` whose elements are created as `DOMElement`, while preserving the standard `Document` interface.

Example

    import klyn.io.xml.dom

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

Inherited Attributes
attribute Inherited Attributes 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 | documentElement `documentElement as DOMElement:` | Root element of the parsed document.

Inherited Properties
property Inherited Properties from XMLDocument: doctype, documentElement, documentURI, domConfig, implementation, inputEncoding, strictErrorChecking, xmlEncoding, xmlStandalone, xmlVersion
property Inherited Properties from XMLNode: attributes, baseURI, childNodes, firstChild, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, ownerDocument, parentNode, prefix, previousSibling, textContent
property Inherited Properties from Document: doctype, documentElement, documentURI, domConfig, implementation, inputEncoding, strictErrorChecking, xmlEncoding, xmlStandalone, xmlVersion
property Inherited Properties from Object: type
property Inherited Properties from Node: attributes, baseURI, childNodes, firstChild, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, ownerDocument, parentNode, prefix, previousSibling, textContent
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | DOMDocument `DOMDocument(implementation as DOMImplementation = null, doctype as DocumentType = null):` | Creates an empty parser document.

Methods

Modifier and Type | Member | Description
--- | --- | ---
public | createElement `createElement(tagName as String) as Element throws DOMException:` | Creates a DOM parser element without a namespace.
public | createElementNS `createElementNS(namespaceURI as String, qualifiedName as String) as Element throws DOMException:` | Creates a DOM parser element with an optional namespace.
public | getElementsByTagName `getElementsByTagName(tagName as String) as DOMNodeList:` | Returns document descendant elements matching a tag name.
public | getElementsByTagNameNS `getElementsByTagNameNS(namespaceURI as String, localName as String) as DOMNodeList throws DOMException:` | Returns document descendant elements matching a namespace URI and local name.

Inherited Methods
method Inherited Methods from XMLDocument: _cloneForDocument, _setDocumentType, adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createEntityReference, createProcessingInstruction, createTextNode, getElementById, getElementsByTagName, getElementsByTagNameNS, importNode, normalizeDocument, renameNode
method Inherited Methods from XMLNode: _collectElementsByTagName, _collectElementsByTagNameNS, _setNamespace, _setOwnerDocument, _setOwnerDocumentRecursive, _setParentNode, appendChild, cloneNode, compareDocumentPosition, getAttribute, getFeature, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setUserData
method Inherited Methods from Document: adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getElementById, getElementsByTagName, getElementsByTagNameNS, importNode, normalizeDocument, renameNode
method Inherited Methods from Object: deepCopy, fromJson, toDict, toJson, toString, toXml
method Inherited Methods from Node: appendChild, cloneNode, compareDocumentPosition, getAttribute, getFeature, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setUserData