I am running into a weird problem with accessing nodes in my XML file.
If I do (in my XQuery file) :
return <result>$myfile/option[2]</result>
It works fine, however, if I try :
return <result>$myfile/option[$myfile/data(@index)]</result>
It doesn't work. The value of $myfile/data(@index)
is 2.
Any insights would be greatly appreciated.