I am trying to pull some data from our XML-native db, IF the value of one element is in contained sequence of values. Don't think I worded that right. For example,
Given the following XML:
<root>
<a>1</a>
<root>
Seems there should be a way to do something like (excuse syntax, treat as pseudo)
where root/a in (1,2,3,4)
From all of my searching, that doesn't seem to be possible. At best, I've gotten:
where root/a = 1 or root/1 = 2 or root/a = 3 etc
is there a better way to do this?
where
expression from your FLWOR into a predicate and select the parent elements with this (equivalent and shorter) XPath expression:/root/parent[a = (1,2,3,4)]
– Bowrah