What do you mean by selecting and Filtering elements in XQuery ?

 Posted by Bharathi Cherukuri on 5/11/2012 | Category: Web Services, Remoting Interview questions | Views: 1414 | Points: 40

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
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 

Comments or Responses

Login to post response