I'm using the Xml.VerySimple unit and I have some trouble removing nodes from my document.

For example: I want to remove the 3rd node and I write

Document.Root.ChildNodes[2].free (or .destroy).
This removes the contents of the node (and all its children), but leaves a "< />", an empty node, on that row and messes up my node count.

What should I do in order to completely remove a node?

Thank you for your help.