public class DomDocument extends XMLDocument:
Compatibility DOM document class returned by DOMParser.
DomDocument is an XMLDocument whose elements are created as DomElement, matching the original DOM parser tests while preserving the standard Document interface.
@example `klyn import klyn.io.xml.dom
document = DomDocument() root = document.createElement("root")
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | documentElementdocumentElement as DomElement: |
Root element of the parsed document. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | DomDocumentDomDocument(implementation as DOMImplementation = null, doctype as DocumentType = null): |
Creates an empty parser document. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | createElementcreateElement(tagName as String) as Element throws DOMException: |
Creates a DOM parser element without a namespace. |
| public | createElementNScreateElementNS(namespaceURI as String, qualifiedName as String) as Element throws DOMException: |
Creates a DOM parser element with an optional namespace. |
| public | getElementsByTagNamegetElementsByTagName(tagName as String) as DomNodeList: |
Returns document descendant elements matching a tag name. |
| public | getElementsByTagNameNSgetElementsByTagNameNS(namespaceURI as String, localName as String) as DomNodeList throws DOMException: |
Returns document descendant elements matching a namespace URI and local name. |