Jeff Mackay wrote: > > > If I delete a node in a DOM tree I'm assuming *all* of the children are > > effectively deleted as well. > > Actually, DOM doesn't provide a way to "delete" a node. You can remove > a node from its parent, which effectively removes the node as well as all > of its children and attributes. But the node still exists, as do its > children > and attributes (perhaps to move to another portion of the document, or to > import into another document). I believe that any "delete" mechanism is > implementation specific.
Sorry for jumping into this discussion, but when you say that the node still exists after you remove it, what happens when I do the following? nodeToDelete.getParentNode().deleteChildNode(nodeToDelete); Is it not "deleted"? Can I still access nodeToDelete somehow? /Christian