Javatpoint Logo
Javatpoint Logo


FLWOR is an acronym which stands for "For, Let, Where, Order by, Return".

  • For - It is used to select a sequence of nodes.
  • Let - It is used to bind a sequence to a variable.
  • Where - It is used to filter the nodes.
  • Order by - It is used to sort the nodes.
  • Return - It is used to specify what to return (gets evaluated once for every node).

XQuery FLWOR Example

Let's take an XML document having the information on the collection of courses. We will use a FLWOR expression to retrieve the titles of those courses which fees are greater than 2000.


Let's take the Xquery document named "courses.xqy" that contains the query expression to be executed on the above XML document.


Create a Java based XQuery executor program to read the courses.xqy, passes it to the XQuery expression processor, and executes the expression. After that the result will be displayed.

Execute XQuery against XML

Put the above three files to a same location. We put them on desktop in a folder name XQuery3. Compile using console. You must have JDK 1.5 or later installed on your computer and classpaths are configured.




java XQueryTester


XQUERY Flwor 1
Next TopicXQuery HTML Format

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA