XMLDocument
classin packageklyn.io.xml.dom
public class XMLDocument extends XMLNode implements Document:
└ XMLNode
└ XMLDocument
All Implemented Interfaces: Document

DOM document implementation for XML trees.

@example `klyn import klyn.io.xml.dom

document = XMLDocument() 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:
No summary.
public readonly property documentElement
documentElement as Element:
No summary.
public property documentURI
documentURI as String:
No summary.
public readonly property domConfig
domConfig as DOMConfiguration:
No summary.
public readonly property implementation
implementation as DOMImplementation:
No summary.
public readonly property inputEncoding
inputEncoding as String:
No summary.
public property strictErrorChecking
strictErrorChecking as Boolean:
No summary.
public readonly property xmlEncoding
xmlEncoding as String:
No summary.
public property xmlStandalone
xmlStandalone as Boolean:
No summary.
public property xmlVersion
xmlVersion as String:
No summary.
Properties inherited from XMLNode: attributes, baseURI, childNodes, firstChild, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, ownerDocument, parentNode, prefix, previousSibling, textContent
Properties inherited from Document: doctype, documentElement, documentURI, domConfig, implementation, inputEncoding, strictErrorChecking, xmlEncoding, xmlStandalone, xmlVersion
Properties inherited from Object: type
Properties inherited 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 XMLDocument
XMLDocument(implementation as DOMImplementation = null, doctype as DocumentType = null):
Creates an empty XML document.
Methods
Modifier and Type Member Description
public _cloneForDocument
_cloneForDocument(node as Node, deep as Boolean) as Node throws DOMException:
Performs a DOM operation.
public _setDocumentType
_setDocumentType(doctype as DocumentType) as Void:
Sets the document type while building a document from a parser.
public adoptNode
adoptNode(source as Node) as Node throws DOMException:
Performs a DOM operation.
public createAttribute
createAttribute(name as String) as Attr throws DOMException:
Performs a DOM operation.
public createAttributeNS
createAttributeNS(namespaceURI as String, qualifiedName as String) as Attr throws DOMException:
Performs a DOM operation.
public createCDATASection
createCDATASection(data as String) as CDATASection throws DOMException:
Performs a DOM operation.
public createComment
createComment(data as String) as Comment:
No summary.
public createDocumentFragment
createDocumentFragment() as DocumentFragment:
No summary.
public createElement
createElement(tagName as String) as Element throws DOMException:
Performs a DOM operation.
public createElementNS
createElementNS(namespaceURI as String, qualifiedName as String) as Element throws DOMException:
Performs a DOM operation.
public createEntityReference
createEntityReference(name as String) as EntityReference throws DOMException:
Performs a DOM operation.
public createProcessingInstruction
createProcessingInstruction(target as String, data as String) as ProcessingInstruction throws DOMException:
Performs a DOM operation.
public createTextNode
createTextNode(data as String) as Text:
No summary.
public getElementById
getElementById(elementId as String) as Element:
No summary.
public getElementsByTagName
getElementsByTagName(tagName as String) as NodeList:
No summary.
public getElementsByTagNameNS
getElementsByTagNameNS(namespaceURI as String, localName as String) as NodeList:
No summary.
public importNode
importNode(importedNode as Node, deep as Boolean) as Node throws DOMException:
Performs a DOM operation.
public normalizeDocument
normalizeDocument() as Void:
No summary.
public renameNode
renameNode(node as Node, namespaceURI as String, qualifiedName as String) as Node throws DOMException:
Performs a DOM operation.
Methods inherited 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
Methods inherited from Document: adoptNode, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getElementById, getElementsByTagName, getElementsByTagNameNS, importNode, normalizeDocument, renameNode
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml
Methods inherited from Node: appendChild, cloneNode, compareDocumentPosition, getAttribute, getFeature, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setUserData