allow to delete xmlnode childs
This commit is contained in:
parent
f405876b35
commit
a534434056
1 changed files with 5 additions and 0 deletions
|
|
@ -121,6 +121,11 @@ proc `[]`* (n: XmlNode, i: int): XmlNode {.inline.} =
|
||||||
assert n.k == xnElement
|
assert n.k == xnElement
|
||||||
result = n.s[i]
|
result = n.s[i]
|
||||||
|
|
||||||
|
proc delete*(n: XmlNode, i: Natural) {.noSideEffect.} =
|
||||||
|
## delete the `i`'th child of `n`.
|
||||||
|
assert n.k == xnElement
|
||||||
|
n.s.delete(i)
|
||||||
|
|
||||||
proc mget* (n: var XmlNode, i: int): var XmlNode {.inline.} =
|
proc mget* (n: var XmlNode, i: int): var XmlNode {.inline.} =
|
||||||
## returns the `i`'th child of `n` so that it can be modified
|
## returns the `i`'th child of `n` so that it can be modified
|
||||||
assert n.k == xnElement
|
assert n.k == xnElement
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue