Retrieving a list using the for loop instead of a while loop

How will you retrieve a list of XML documents from the Tamino database without using the TXMLObjectIterator of which you must use the while statement, but using something that you can apply a for loop.
Eg.

response = processQuery("for $e in input()/Employee return $e");
if (!response.hasFirstXMLObject()) 
  throw new Exception("Nothing found");
xmlObject = response.getFirstXMLObject();
TXMLObjectIterator empIt = response.getXMLObjectIterator();
      while (empIt.hasNext()) {  


Please advise.
Best Regards

Hello,

The best thing to use is the Iterator especially if a pagesize is being used. What you could do is construct a Vector, use the iterator to add items to the Vector. Then you can convert the Vector into an array and then simply use for loops to work through the array.

Hope this helps.

Stuart Fyffe-Collins
Software AG (UK) Ltd.