Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

CHAPTER 8 XML Query > XQuery Expressions

XQuery Expressions

An XQuery can be as simple as a single XPath expression or as complicated as a query with functional calls, conditional processes, and XML result constructions. In general, XQuery syntax is a FLWOR (pronounced “flower”) expression. FLWOR stands for for, let, where, order by, and return:

Image  For Iterates over a sequence of items, each of which could be XML nodes or atomic values.

Image  Let Declares variables that can be sequences of XML nodes or atomic values.

Image  Where Defines the conditions for filtering the result.

Image  Order By Specifies the sorting order of the result.

Image  Return Returns the result content.

The following is a typical XQuery example with a FLWOR expression (xq_flwor.sql):

Listing 8-1 XQuery FLWOR Expression in XMLQuery()


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial