Here is a snippet of groovy that will replace every value in all test requests as null. Put in the logic to replace it with your specific requests and your golden.
//Some Java imports in order to handle things a bit better
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
def XmlUtils = com.eviware.soapui.support.xml.XmlUtils;
def XML = "";
//Looping through all WsdlTestRequestStep type of Steps
for ( tests in testRunner.testCase.getTestStepsOfType(com.eviware.soapui.impl.wsdl.teststeps.WsdlTestRequestStep.class) ) {
//Setting up a NodeList for all of the nodes within the request
NodeList nodes = XmlUtils.parseXml(tests.getPropertyValue("Request")).getChildNodes();
//Calling the parseNodes function
parseNodes(nodes);
//Switching the nodes back to a string
XML = XmlUtils.prettyPrintXml(XmlUtils.createXmlObject(nodes.item(0).getParentNode()));
//Setting the string to the Request Property
tests.setPropertyValue("Request",XML);
}
static void parseNodes(NodeList nodeList) {
//Loops through the nodeList
for (int i = 0; i < nodeList.getLength(); i++) {
//Get the current node
Node childNode = nodeList.item(i);
//Set the node value to Null (THIS IS WHERE YOU WOULD START TO ADD IN YOUR LOGIC OR WITH A DIFFERENT STEP
//If you just want this as a post processing parser than do an if statement to check if the value is ?
com.eviware.soapui.support.xml.XmlUtils.setNodeValue(childNode,null);
//Check if it has any child nodes
NodeList children = childNode.getChildNodes();
if (children != null) {
//If it does have child nodes, redo this function
parseNodes(children);
}
}
}