I don't know of a way to delete things from XML with jelly. The only approach I have found to work is replacing the XML portion with some empty XML, for example:
<gel:parse var="xml">
<a>
<b>
<c with="some" attributes="foo" />
</b>
<d>
<e with="some" attributes="bar" />
<e with="different" attributes="true" />
<f another="element" />
</d>
</a>
</gel:parse>
If we do the following:
<gel:parse var="newB">
<b />
</gel:parse>
and
<gel:set select="$xml/a/b" value="${newB}" />
our XML looks like this:
<a>
<b> </b>
<d>
<e with="some" attributes="bar" />
<e with="different" attributes="true" />
<f another="element" />
</d>
</a>
This works fine if we want to remove all the children of an element, but not much good for anything else. As you can see <b /> is still there, and these is no way to remove all the 'e's but leave the 'f', for instance, or delete an attribute from an element. Happy to hear from anyone else that has solved this one.