Answer: We can select and filter the xml elements with FLWOR and Path expression.
Below is an example for FLWOR expression:
for $a in doc("bookmart.xml")/bookstore/book
where $a/price<150
order by $a/title
return $a/title
Where,
1. for : It is an optional and use to bind a variable to each item.
for $a in (1 to 5)
return <test>{$a}</test>
Asked In: Many Interviews |
Alert Moderator