How to insert this kind of queries

Hi all,
Because of Tamino examples I know how to resolve queries like this //surname='Atkins using these functions:
TQuery querysome = TQuery.newInstance( Doctype + “[//surname=‘Atkins’]” );
performQueryAndListPersons( accessor, querysome, req, res );

I need to resolve these other kind of queries:
for $b in input()/person
where $b/surname=“Atkins”
return $b/occupation
but I don’t know what functions I could use to resolve it.

If anyone know something about this I will be grateful.
Thanks a lot,
Diego

Hi Diego,
You can resolve mentioned XQuery same way as X-Query given in Tamino Person example. The mentioned XQuery returns “occupation” elements of the “Person” which satisfies the given condition. So here in response to xquery, returned TResponse will contain the TXMLObjects containing the “occupation” elements.

So, here you need to write similar function which will parse the TXMLObjects present in TResponse to retrieve the elements keeping in mind that doctype or root element is “occupation”.

Hi Diego,
You can resolve mentioned XQuery same way as X-Query given in Tamino Person example. The mentioned XQuery returns “occupation” elements of the “Person” which satisfies the given condition. So here in response to xquery, returned TResponse will contain the TXMLObjects containing the “occupation” elements.

So, here you need to write similar function which will parse the TXMLObjects present in TResponse to retrieve the elements keeping in mind that doctype or root element is “occupation”.

Thank you very much for the reply but I meant how to solve XQuery consultings with the structure (for-where-return). What functions I need to solve it because I will need later to solve them to do more elaborated colsultings.
Thanks a lot,
Diego