I modified the `write` proc as suggested but it doesn't help:
if node.kind in {xnText, xnCData, xnEntity, xnComment} and
node.text != "":
file.write(node.text)
Run
Assert:
fatal.nim(39) sysFatal
Error: unhandled exception: xmltree.nim(213, 10) `n.k == xnElement`
[AssertionError]
Run
I also tried:
if node.kind != xnElement and node.text != "":
file.write(node.text)
Run
And that also asserted with the same message.
And just to be sure I then commented out the `if` statement so that I _never_
use `node.text`; and it still gives exactly the same assertion.