This module implements XML DOM Level 2 Core specification (http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html)
EDOMException = object of ValueError
EDOMStringSizeErr = object of EDOMException
EHierarchyRequestErr = object of EDOMException
EIndexSizeErr = object of EDOMException
EInuseAttributeErr = object of EDOMException
EInvalidAccessErr = object of EDOMException
EInvalidCharacterErr = object of EDOMException
EInvalidModificationErr = object of EDOMException
EInvalidStateErr = object of EDOMException
ENamespaceErr = object of EDOMException
ENotFoundErr = object of EDOMException
ENotSupportedErr = object of EDOMException
ENoDataAllowedErr = object of EDOMException
ENoModificationAllowedErr = object of EDOMException
ESyntaxErr = object of EDOMException
EWrongDocumentErr = object of EDOMException
PDOMImplementation = ref DOMImplementation
PNode = ref Node
PElement = ref Element
PCharacterData = ref CharacterData
PDocument = ref Document
PAttr = ref Attr
PDocumentFragment = ref DocumentFragment
PText = ref Text
PComment = ref Comment
PCDataSection = ref CDataSection
PProcessingInstruction = ref ProcessingInstruction
ElementNode = 1
AttributeNode = 2
TextNode = 3
CDataSectionNode = 4
ProcessingInstructionNode = 7
CommentNode = 8
DocumentNode = 9
DocumentFragmentNode = 11
proc getDOM(): PDOMImplementation {...}{.raises: [], tags: [].}proc createDocument(dom: PDOMImplementation; namespaceURI: string;
qualifiedName: string): PDocument {...}{.raises: [], tags: [].}proc createDocument(dom: PDOMImplementation; n: PElement): PDocument {...}{.raises: [],
tags: [].}proc hasFeature(dom: PDOMImplementation; feature: string; version: string = ""): bool {...}{.
raises: [], tags: [].}true if this version of the DomImplementation implements feature, otherwise false proc implementation(doc: PDocument): PDOMImplementation {...}{.raises: [], tags: [].}proc documentElement(doc: PDocument): PElement {...}{.raises: [], tags: [].}proc createAttribute(doc: PDocument; name: string): PAttr {...}{.
raises: [EInvalidCharacterErr], tags: [].}proc createAttributeNS(doc: PDocument; namespaceURI: string; qualifiedName: string): PAttr {...}{.
raises: [EInvalidCharacterErr, ENamespaceErr], tags: [].}proc createCDATASection(doc: PDocument; data: string): PCDataSection {...}{.raises: [],
tags: [].}proc createComment(doc: PDocument; data: string): PComment {...}{.raises: [], tags: [].}proc createDocumentFragment(doc: PDocument): PDocumentFragment {...}{.raises: [], tags: [].}proc createElement(doc: PDocument; tagName: string): PElement {...}{.
raises: [EInvalidCharacterErr], tags: [].}proc createElementNS(doc: PDocument; namespaceURI: string; qualifiedName: string): PElement {...}{.
raises: [ENamespaceErr, EInvalidCharacterErr], tags: [].}proc createProcessingInstruction(doc: PDocument; target: string; data: string): PProcessingInstruction {...}{.
raises: [EInvalidCharacterErr], tags: [].}proc createTextNode(doc: PDocument; data: string): PText {...}{.raises: [], tags: [].}proc getElementsByTagName(doc: PDocument; tagName: string): seq[PNode] {...}{.raises: [],
tags: [].}proc getElementsByTagNameNS(doc: PDocument; namespaceURI: string; localName: string): seq[
PNode] {...}{.raises: [], tags: [].}proc importNode(doc: PDocument; importedNode: PNode; deep: bool): PNode {...}{.
raises: [ENotSupportedErr], tags: [].}proc firstChild(n: PNode): PNode {...}{.raises: [], tags: [].}proc lastChild(n: PNode): PNode {...}{.raises: [], tags: [].}proc localName(n: PNode): string {...}{.raises: [], tags: [].}proc namespaceURI(n: PNode): string {...}{.raises: [], tags: [].}proc namespaceURI=(n: PNode; value: string) {...}{.raises: [], tags: [].}proc nextSibling(n: PNode): PNode {...}{.raises: [], tags: [].}proc nodeName(n: PNode): string {...}{.raises: [], tags: [].}proc nodeType(n: PNode): int {...}{.raises: [], tags: [].}proc ownerDocument(n: PNode): PDocument {...}{.raises: [], tags: [].}proc parentNode(n: PNode): PNode {...}{.raises: [], tags: [].}proc previousSibling(n: PNode): PNode {...}{.raises: [], tags: [].}proc prefix=(n: PNode; value: string) {...}{.raises: [EInvalidCharacterErr, ENamespaceErr],
tags: [].}proc appendChild(n: PNode; newChild: PNode) {...}{.raises: [EHierarchyRequestErr,
EWrongDocumentErr, ENoModificationAllowedErr], tags: [].}proc cloneNode(n: PNode; deep: bool): PNode {...}{.raises: [], tags: [].}deep is true, Element node's children are copied proc hasAttributes(n: PNode): bool {...}{.raises: [], tags: [].}proc hasChildNodes(n: PNode): bool {...}{.raises: [], tags: [].}proc insertBefore(n: PNode; newChild: PNode; refChild: PNode): PNode {...}{.
raises: [EWrongDocumentErr], tags: [].}newChild before the existing child node refChild. If refChild is nil, insert newChild at the end of the list of children. proc isSupported(n: PNode; feature: string; version: string): bool {...}{.raises: [], tags: [].}proc normalize(n: PNode) {...}{.raises: [], tags: [].}proc removeChild(n: PNode; oldChild: PNode): PNode {...}{.raises: [ENotFoundErr], tags: [].}oldChild from the list of children, and returns it. proc replaceChild(n: PNode; newChild: PNode; oldChild: PNode): PNode {...}{.
raises: [EWrongDocumentErr, ENotFoundErr], tags: [].}oldChild with newChild in the list of children, and returns the oldChild node. proc getNamedItem(nList: seq[PNode]; name: string): PNode {...}{.raises: [], tags: [].}name. If this node cannot be found returns nil proc getNamedItem(nList: seq[PAttr]; name: string): PAttr {...}{.raises: [], tags: [].}name. If this node cannot be found returns nil proc getNamedItemNS(nList: seq[PNode]; namespaceURI: string; localName: string): PNode {...}{.
raises: [], tags: [].}localName and namespaceURI. If this node cannot be found returns nil proc getNamedItemNS(nList: seq[PAttr]; namespaceURI: string; localName: string): PAttr {...}{.
raises: [], tags: [].}localName and namespaceURI. If this node cannot be found returns nil proc item(nList: seq[PNode]; index: int): PNode {...}{.raises: [], tags: [].}index th item in the map. If index is greater than or equal to the number of nodes in this map, this returns nil. proc removeNamedItem(nList: var seq[PNode]; name: string): PNode {...}{.
raises: [ENotFoundErr], tags: [].}name Raises the ENotFoundErr exception, if the node was not found proc removeNamedItemNS(nList: var seq[PNode]; namespaceURI: string; localName: string): PNode {...}{.
raises: [ENotFoundErr], tags: [].}proc setNamedItem(nList: var seq[PNode]; arg: PNode): PNode {...}{.
raises: [EWrongDocumentErr], tags: [].}arg as a Node to the NList If a node with the same name is already present in this map, it is replaced by the new one. proc setNamedItem(nList: var seq[PAttr]; arg: PAttr): PAttr {...}{.
raises: [EWrongDocumentErr, EInuseAttributeErr], tags: [].}arg as a Node to the NList If a node with the same name is already present in this map, it is replaced by the new one. proc setNamedItemNS(nList: var seq[PNode]; arg: PNode): PNode {...}{.
raises: [EWrongDocumentErr], tags: [].}namespaceURI and localName proc setNamedItemNS(nList: var seq[PAttr]; arg: PAttr): PAttr {...}{.
raises: [EWrongDocumentErr, EInuseAttributeErr], tags: [].}namespaceURI and localName proc name(a: PAttr): string {...}{.raises: [], tags: [].}proc specified(a: PAttr): bool {...}{.raises: [], tags: [].}proc ownerElement(a: PAttr): PElement {...}{.raises: [], tags: [].}proc tagName(el: PElement): string {...}{.raises: [], tags: [].}proc getAttribute(el: PNode; name: string): string {...}{.raises: [], tags: [].}name proc getAttributeNS(el: PNode; namespaceURI: string; localName: string): string {...}{.
raises: [], tags: [].}localName and namespaceURI proc getAttributeNode(el: PElement; name: string): PAttr {...}{.raises: [], tags: [].}name To retrieve an attribute node by qualified name and namespace URI, use the getAttributeNodeNS method proc getAttributeNodeNS(el: PElement; namespaceURI: string; localName: string): PAttr {...}{.
raises: [], tags: [].}localName and namespaceURI proc getElementsByTagName(el: PElement; name: string): seq[PNode] {...}{.raises: [], tags: [].}el with a given tag name, in the order in which they are encountered in a preorder traversal of this Element tree If name is *, returns all descendant of el proc getElementsByTagNameNS(el: PElement; namespaceURI: string; localName: string): seq[
PNode] {...}{.raises: [], tags: [].}localName and namespaceURI in the order in which they are encountered in a preorder traversal of this Element tree proc hasAttribute(el: PElement; name: string): bool {...}{.raises: [], tags: [].}true when an attribute with a given name is specified on this element , false otherwise. proc hasAttributeNS(el: PElement; namespaceURI: string; localName: string): bool {...}{.
raises: [], tags: [].}true when an attribute with a given localName and namespaceURI is specified on this element , false otherwise proc removeAttribute(el: PElement; name: string) {...}{.raises: [], tags: [].}name proc removeAttributeNS(el: PElement; namespaceURI: string; localName: string) {...}{.
raises: [], tags: [].}localName and namespaceURI proc removeAttributeNode(el: PElement; oldAttr: PAttr): PAttr {...}{.
raises: [ENotFoundErr], tags: [].}ENotFoundErr proc setAttributeNode(el: PElement; newAttr: PAttr): PAttr {...}{.
raises: [EWrongDocumentErr, EInuseAttributeErr], tags: [].}nil is returned. proc setAttributeNodeNS(el: PElement; newAttr: PAttr): PAttr {...}{.
raises: [EWrongDocumentErr, EInuseAttributeErr], tags: [].}newAttr is present, it is replaced by the new one and the replaced attribute is returned, otherwise nil is returned. proc setAttribute(el: PElement; name: string; value: string) {...}{.
raises: [EInvalidCharacterErr, EWrongDocumentErr, EInuseAttributeErr], tags: [].}name and value If an attribute with that name is already present in the element, its value is changed to be that of the value parameter Raises the EInvalidCharacterErr if the specified name contains illegal characters proc setAttributeNS(el: PElement; namespaceURI, localName, value: string) {...}{.raises: [
EInvalidCharacterErr, ENamespaceErr, EWrongDocumentErr, EInuseAttributeErr],
tags: [].}namespaceURI, localName and value. proc splitData(textNode: PText; offset: int): PText {...}{.raises: [EIndexSizeErr], tags: [].}proc target(pi: PProcessingInstruction): string {...}{.raises: [], tags: [].}proc escapeXml(s: string; result: var string) {...}{.raises: [], tags: [].}proc escapeXml(s: string): string {...}{.raises: [], tags: [].}proc `$`(doc: PDocument): string {...}{.raises: [], tags: [].}
© 2006–2018 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/xmldom.html