Intermountain_H_3
14 years agoContributor
export the xpath of all nodes in the request or response
Hi all
was wondering is there a way in soapui -- ( groovy script) or report or feature to export the xpath of all nodes in the request or response to a file . All at once I know I can grap each node one at a time through the ui.
But I have requests and responses with over 800 fields matching each one become's a chore at best.
the tree is at time 8 levels deep with the same node names in differnt branches..
Going to try and make my question clearer ...
I would like to turn this into
<attributions>
<action>
<value>
<code>510055894</code>
<orginalText>actionID</orginalText>
</value>
</action>
<actionMethod>
<value>
<code>138</code>
<orginalText>ActionMethods Text</orginalText>
</value>
</actionMethod>
</attributions>
into this ::
//Result[1]/attributions[1]/action[1]/value[1]/code[1]
//Result[1]/attributions[1]/action[1]/value[1]/orginalText[1]
//Result[1]/attributions[1]/actionMethod[1]/value[1]/code[1]
//Result[1]/attributions[1]/actionMethod[1]/value[1]/orginalText[1]
was wondering is there a way in soapui -- ( groovy script) or report or feature to export the xpath of all nodes in the request or response to a file . All at once I know I can grap each node one at a time through the ui.
But I have requests and responses with over 800 fields matching each one become's a chore at best.
the tree is at time 8 levels deep with the same node names in differnt branches..
Going to try and make my question clearer ...
I would like to turn this into
<attributions>
<action>
<value>
<code>510055894</code>
<orginalText>actionID</orginalText>
</value>
</action>
<actionMethod>
<value>
<code>138</code>
<orginalText>ActionMethods Text</orginalText>
</value>
</actionMethod>
</attributions>
into this ::
//Result[1]/attributions[1]/action[1]/value[1]/code[1]
//Result[1]/attributions[1]/action[1]/value[1]/orginalText[1]
//Result[1]/attributions[1]/actionMethod[1]/value[1]/code[1]
//Result[1]/attributions[1]/actionMethod[1]/value[1]/orginalText[1]