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
import klyn.io.xml.dom

document = XMLDocument()
root = document.createElement("root")
document.appendChild(root)
Inherited Attributes
attributeInherited 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 doctype
doctype as DocumentType
Current document type child, or null when the document has none.
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.
Inherited Properties
propertyInherited Properties from XMLNode: attributes, baseURI, childNodes, firstChild, lastChild, localName, namespaceURI, nextSibling, nodeName, nodeType, nodeValue, ownerDocument, parentNode, prefix, previousSibling, textContent
propertyInherited Properties from Object: type
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.
Inherited Methods
methodInherited 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
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml