JimBooth
JimBooth

Reputation: 1

Can I use XQuery in Groovy scripts within SoapUI?

I am trying to use XQuery within groovy scripts within SoapUI but not sure if this is possible.

I need to query XML files. For example, find the number value from a Firstname=Jim and Surname=Booth that all belongs to the Summary.

<Summary>
    <Number>123</Number>
    <Surname>Booth</Surname>
    <FirstName>Jim</FirstName>
</Summary>

I have looked into XPath and GPath but don't think it is possible.

Upvotes: 0

Views: 769

Answers (2)

har07
har07

Reputation: 89305

"I have looked into xPath and GPath but don't think it is possible."

I don't know about groovy and whether it support XQuery or not, but your example case can be implemented in XPath as follow :

//Summary[FirstName="Jim" and Surname="Booth"]/Number

Upvotes: 1

Related Questions