Hey mogili.
Your loop syntax looks a bit off. We need to make a couple of corrections.
To be able to use what's in m as a stop value we need to convert it to a int. The return value of getNodeValue is a String.
This can easilty be converted using:
def maxResults = Integer.parseInt(m)
Then we must correct the loop syntax.
There is quite a difference between the two operators = and ==, we use = for assignment and == for equality. So we neec to change your loop to:
for (i = 1; i <=maxResults; i++) {
//Do your loop thing here
}
Which can be read as: Starting at i=1 and while i is less than or equal maxResult do loop stuff and for every loop increase i by one.
Regards
//Gustav Lundström