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.
Note that XQuery represents a superset of XPath 2.0, which in turn is based on XPath 1.0. If you have prior experience with Figaro 1.x, then you should be familiar with XPath as that was the query language offered by that library.
Figaro supports the entire W3 XQuery specification. As of this printing, the specification is dated July 2004. However, Figaro will be updated to track any changes in the working specification that may occur. You can find the XQuery specification at http://www.w3.org/XML/Query.
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.
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 Figaro Documents using XQuery for that information.