posted 14 years ago
Well, you get a reference to the node you want to remove, then you get a reference to its parent, then you call parent.removeNode(child). Don't forget, that just changes your DOM. It doesn't change the original document from which you created the DOM. So you have to serialize the DOM back to a file.