Here's a second feedback (sorry for being distracted): Your query does return standard Java DOM elements, the toString() method of which returns "[li: null]". As you are probably interested in the string representation of the elements, you'll need to replace "toJava()" with "serialize()":
System.out.println(item.serialize()); Hope this helps, Christian ___________________________ On Sat, Jul 7, 2012 at 1:26 PM, Christian Grün <[email protected]> wrote: > Your query will yield the expected results if you remove the explicit > cq.execute(); call. > > In the latest snapshot [1], an exception will be returned if the > result has already been requested. > > Hope this helps, > Christian > > [1] http://files.basex.org/releases/latest/ > ___________________________ > >> Dear Christian >> >> Please find attached 2 files, MyRunQueries.java and input.xml >> >> The .java file is an edited version of RunQueries.java version and the >> >> I hope this would be sufficient for you to test. >> >> >> >> Regards >> Anand chiney >> >> -----Original Message----- >> From: Christian Grün [mailto:[email protected]] >> Sent: Saturday, July 07, 2012 4:34 PM >> To: Sandeep Yohans >> Cc: Anand Chiney; [email protected] >> Subject: Re: Problem with RunQueries.java example!! >> >> One again I'm sorry… Please send us a (small !) example that we can >> try by ourselves. >> >> Thank you in advance, >> Christian >> ___________________________ >> >> On Sat, Jul 7, 2012 at 1:02 PM, Sandeep Yohans <[email protected]> >> wrote: >>> Hello Christian, >>> >>> We are extracting names from a very long list of names. The item.toJava() >>> method call in iterate(query) is returning null. >>> example output: >>> >>> [li: null] >>> >>> Rest of the methods are printing output fine. >>> >>> >>> -- >>> Thanks and Regards >>> >>> Sandeep Yohans >>> Software Developer >>> Systems - AIR Infotech >>> Nagpur - India >>> www.airinfotech.in >>> Mobile: +91-997-086-5520 >>> _______________________________________________ BaseX-Talk mailing list [email protected] https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

