I have an XML document:
<resultsets>
<row>
<emp_no>10001</emp_no>
<first_name>Georgi</first_name>
<last_name>Facello</last_name>
</row>
<row>
<emp_no>10007</emp_no>
<first_name>Bezalel</first_name>
<last_name>Simmel</last_name>
</row>
</resoutsets>
I have one variable query emp_no
field defined as:
let $emp_no := doc("employees.xml")//emp_no
I want to use the $emp_no node name (emp_no) in my query to do the same thing, something like:
doc("employees.xml")//$emp_no/name()
Is it possible to involve a variable in the path on the left side of the expression?