Forum Discussion

linhptt's avatar
linhptt
New Contributor
7 years ago
Solved

Extract data from JDBC step

I have some confuse with Ready API. Could anyone help?

 

Here is the response data from JDBC step:

<Results>
   <ResultSet fetchSize="0">
      <Row rowNumber="1">
         <DESCRIPTION>auto1</DESCRIPTION>
      </Row>
      <Row rowNumber="2">
         <DESCRIPTION>auto2</DESCRIPTION>
      </Row>
      <Row rowNumber="3">
         <DESCRIPTION>auto3</DESCRIPTION>
      </Row>
   </ResultSet>
</Results>

 

In the Xpath assertion, I use //DESCRIPTION  then I got the result is an array.

But in another step, I want to use above response by using context.expand function:

context.expand('${JDBC#ResponseAsXml#//DESCRIPTION}')

==> the result is a String only, with value is 'auto1'

 

==> is there any bug here ? if not. could anyone  help me to extract all data?

 

Many thanks and have a nice day!

2 Replies