evoks
8 years agoOccasional Contributor
SOAPUI - Groovy : Get parent names / children names / nodes values from XML response
Hi, I am parsing an xml response with SOAPUI and using a Groovy script like this. The goal of this script is to get children nodes names and values in xml response. def parsing = """
<Bod...
- 8 years ago
This is similar to https://stackoverflow.com/questions/36179764/get-path-to-all-xmls-nodes
private static String getXPath(node) { if (node.parent().name() == node.name()) { return node.name() } return getXPath(node.parent()) + "/" + node.name() }
then use
output << getXPath(node)+'='+node.text()