xml - How to convert a element node to document in xquery -
i have xml.
let $a := <a> <b>asd</b> <c>bvn</c> </a>
if give return $a/a/b
not work element node.
so need convert element node document node. in order make work.
i cant change xpath
. anyway result using same xpath
'/a/b'?
you can create document node if need to
let $a := <a> <b>asd</b> <c>bvn</c> </a> let $a := document{$a} return $a/a/b
or directly
let $a := document { <a> <b>asd</b> <c>bvn</c> </a> } return $a/a/b
Comments
Post a Comment