If you had asked how to remove elements from an XML document, I would have suggested using an XSLT identity transformation plus a template that failed to copy the elements you wanted to remove. And that's what you have there. So yes, I approve.
Besides, it works, right?
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Remove sibling elements according to the value of the attribute of another element