This is what I'd like to do in JMeter, retrieve the data in xml from the server, and continue retrieving until reaching at a certain number.

```
While ( totalNumOfNodes < 1000 ) {
   1. HpptRequest
   2. nodeCntInResp = extract from HttpResponse
   3. totalNumOfNodes += nodeCntInResp
} 

```

I can do step 1 and 2, but how can I do the step 3? What element should I use for this?