Xpath Reg-Ex option for looping
Options
Parasofttoudaya
Posts: 232 ✭✭
in SOAtest
Hi Team,
I have an requirement, where i need to perform operation on two level of data in array.
is it possible to perform regular xpression like below. (Nested For)
for $itemX in (/root/item)
for $itemY in ($itemX/products/) return
if (condition ) then
$something
else
$something else
0
Comments
-
From an earlier post witabledatasource-options-to-put-null-value-when-element-is-not-there:
In XPath, there are various string functions including "matches" which accepts a regular expression:
https://www.w3.org/TR/xpath-functions/#func-matchesYou should be able to use the "matches" function for the condition in your "if" statement, for example.
0