For the following JDBC XML result:
<Results>
<ResultSet fetchSize="128">
<Row rowNumber="1">
<ID>10021</ID>
<NAME>Test</NAME>
</Row>
<Row rowNumber="2">
<ID>10022</ID>
<NAME>Testing</NAME>
</Row>
<Row rowNumber="3">
<ID>10023</ID>
<NAME>Hello World</NAME>
</Row>
</ResultSet>
</Results>
using script
import com.eviware.soapui.support.XmlHolder
def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
def holder2 = groovyUtils.getXmlHolder( "JDBC Request#ResponseAsXml" )
// loop item nodes in response message
for( item in holder2.getDomNodes( "//Row" ))
log.info groovy.xml.dom.DOMCategory.xpath(item, "//ID")
I get the following results:
Tue Jan 10 10:57:15 CET 2012:INFO:10021
Tue Jan 10 10:57:15 CET 2012:INFO:10021
Tue Jan 10 10:57:15 CET 2012:INFO:10021
I got the same behavior when trying some XPath assertions.
Does anyone have an idea why it returns the correct number of records (3), but always 'selects' the same record?
Tnx!