I try to remove all head:book elements from following request excerpt:
<head:bookstore>
<head:book>9</head:book>
<head:book>10</head:book>
</head:bookstore>
requestHolder.getDomNodes("//head:bookstore/head:book").each {
requestNode.removeChild(it)
}
What am I doing wrong here?
updatE:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def requestHolder = groovyUtils.getXmlHolder("openBook#Request")
Here below the solution to remove the nodes of the XML, please notice that you can get the entire xml and you may need to edit the nodes name of the below script