Forum Discussion

ndavenport's avatar
ndavenport
Occasional Contributor
16 years ago

XPath Assertion Giving Error

I've tried to setup an XPath Assertion.  The syntax is valid (I've tested it outside in Sylus).  I'm trying to return all values based on this query: //ns2:return/ns3:channelStatus

When I run this in Stylus (XML tool suite) it returns all of the values I want.  However, when I run this in SoapUI I get the following error: "More than one match in current response"  I know there is more then one match...that's the point of the query.

Any thoughts?  Thanks!

12 Replies

  • ndavenport's avatar
    ndavenport
    Occasional Contributor
    Yup, I can certainly do that...and I just might...the setup for a few thousand will be a bit of a pain but after the initial setup it should be ready to go.  Thanks for the help.
  • Hi,
    I find a solution for this more than one response

    I was trying with following Query
    for $x in //rat:processingMessages
    return <LI> {$x/rat1:messageCode/text() }</LI>


    I got the error saying
    more than one match find in response


    So i wrap the query with Html element then it worked as expected.
    <result>
    for $x in //rat:processingMessages
    return <LI> {$x/rat1:messageCode/text() }</LI>
    } </result>