I'm copying a range from the page and pasting it back elsewhere, but this becomes problematic when it includes a piece of the page that I don't want to copy. Is there a good way to remove nodes from a range by id? Or if not, in the event that there are two nodes on the page with the same id, is there any way to identify one over the other (ie, via first specifying a unique parent id?)
Note: JavaScript only please - I can't use a library for this solution.