Forum Discussion

rickl11's avatar
rickl11
New Contributor
14 years ago

Generate XML xpath for all nodes in xml 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. 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..

thanks in adv for any or all help
  • rickl11's avatar
    rickl11
    New Contributor
    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]

    for each node in a request or response
    all at one time
    Thanks for any and all help