Monday, 20 October 2014

groovy get xml attribute value



Could any one help with such xml?



<ResultSet fetchSize="10">
<Row rowNumber="1">
<ID>1</ID>
</Row>
<Row rowNumber="2">
<ID>2</ID>
</Row>


I'm trying to get the value of fetchSize attribute by using groovy


I tried like



ResultSet.value()
ResultSet.text()
ResultSet.size()


but it didn't work is that case


first, I used new XmlParser().parseText(responseAsXml)


No comments:

Post a Comment