Hi,

I am trying to execute a query in java and trying to fetch the result set using Iter Object. But Iterating through the result set return "null", but when i am executing the same query and getting Result object i am able to see the result set. Why this is happen. Please Help Me.

QueryProcessor pr = new QueryProcessor("let $a := /data/product/*  return $a ",context);
pr.context(dataset);

Now I am taking Iter object as:
 
 Iter itr=pr.iter();

 Now, executing itr.get(0)  gives me "null", but when i execute it as

 Result rs = pr.execute()
 Sytem.out.println("Products ::" + rs) ... it shows the fetch products.

But, also itr.next().serialise() also gives me the result.