Quantcast
Channel: New board topics in SmartBear Community
Viewing all articles
Browse latest Browse all 20755

XQuery Match Configuration or Groovy Script

$
0
0

I have an XML Response in SOAP which has the below format 

<diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"><NewDataSet xmlns=""><Status diffgr:id="Status12" msdata&colon;rowOrder="11"><id>28</id><name>Review</name><categoryId>3</categoryId><assignrule>P</assignrule><ismoveAssign>0</ismoveAssign><isActive>1</isActive></Status></NewDataSet></diffgr:diffgram>

 I have to extract the statuses which are more than 500 and I am trying to extract the same by using XQuery Match 

 

<Result>
{
    for $x in //*[local-name() = 'NewDataSet']/*[local-name()='Status']/*[local-name()='name']

    return <name> string ($x) </name>
}</Result>

 But in the output I am able to find only 

 <Result>
<name>string ($x)</name>
<name>string ($x)</name>

</Result>

 

Please assist me in this regard. Is my XQuery Correct or should I use Script Assertion?

 

Please find below the XML response and it is very huge consisting of nearly 4000 lines.

 

2016-03-03_190535.jpg


Viewing all articles
Browse latest Browse all 20755

Trending Articles