Using XQuery
Documents are retrieved from Figaro containers using XQuery expressions. XQuery is a language designed to query XML documents. Using XQuery, you can retrieve entire documents, subsections of documents, or values from one or more individual document nodes. You can also use XQuery to manipulate or transform values returned by document queries. You can also extend XQuery's functionality through the use of external functions you can build using .NET code. Note that XQuery represents a superset of XPath 2.0, which in turn is based on XPath 1.0.
Beyond the W3C specifications, there are several good books on the market today that fully describe XQuery. In addition, there are many freely available resources on the web that provide a good introduction to the language. Searching for 'XQuery' in the Web search engine of your choice ought to return a wealth of information and pointers on the language. See the XQuery Resources page for a list of helpful references.
That said, this chapter begins with a very thin introduction to XQuery that should be enough for you to understand any Figaro concepts required to proceed with usage of the library. In particular, the next section of this manual highlights those aspects of XQuery that have unique meanings relative to Figaro usage. Be aware, however, that the following introduction is not meant to be complete — a full treatment of XQuery is beyond the scope of an introductory manual such as this.
We follow this brief introduction to XQuery with a general description of querying documents stored in Figaro containers, and examining the results of those queries. See Retrieving Data Using XQuery for that information.
In This Section
- XQuery: A Brief Introduction
- Referencing Portions of Documents Using XQuery
- Using FLWOR
- Retrieving Data Using XQuery