I've got a tango.text.xml.Document object. I need to update some of its contents. I start with using a filter query to find the element I'm interested in. That gives me a Node that I can play with.
What's an efficient way of just replacing most or all of the contents of that element and its children? Do I call detach on it and then add it back in? I could do a foreach over attributes and child elements, and replace each individual value, but I have a feeling a wholesale replacement could be faster.
I guess I could just dump the child elements (there are maybe 10 of them), and then add them back in. How would I do that?