1

I have a XML that contains a snippet like

<modules>
  <module>aaa</module>
  <module>bbb</module>
</modules>

Now I want to remove the node/tag that contains the value "bbb" in the XML using XmlSlurper in groovy.

Any help?

Vishnu
  • 7
  • 1
  • hi, you might be able to do something like `def doc = new XmlSlurper().parseText(...); doc.children().findAll { item.text() == 'bbb' }.replaceNode {}` to removed the matched nodes. – jspcal Aug 16 '21 at 18:31

0 Answers0