XQuery : how to get the previous element than the one chosen in an XML file?

ToonGM

New Member
Well if I have for example:\[code\]<entries> ... <entry id="34" weight="83">...</entry> <entry id="35" weight="21">...</entry> ...</entries>\[/code\]For any reason I get the entry whose ID is 35: \[code\]let $entry := //entry[xs:integer(./@weight)=21]\[/code\]. How can I simply get the previous entry (ID 34) ?
 
Back
Top