XPath 2.0: how to test that we have in a variable is an element?
-
03-07-2019 - |
Question
Say I have a variable $foo
. I'd like to use $foo castable as element()
, but I can't use a node type after castable.
Solution
$foo instance of element()
does the trick.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow