Hi all,
I have the following query:
for $a in input()/DataRoot/Request
where $a/@id=12345678
return $a
This query retrieves all Request-elements where the id is 12345678.
But what if I’d like to search for this id in the whole DataRoot-element and its children, and children of them and so on? Is there any query to search for a certain attribute in the whole hierarchy?
Thanks in advance,
Hoscha
Solved it! Here’s the solution:
for $a in input()/DataRoot/descendant::Request
where $a/@id=12345678
return $a