Retrieving Data Using XQuery
Documents are retrieved from Figaro when they match an XQuery path expression. Queries are either performed or prepared using an XmlManager object, but the query itself usually restricts its scope to a single container or document using one of the XQuery Navigation Functions.
When you perform a query, you must provide:
- The XQuery expression to be used for the query contained in a single string object.
- A QueryContext object that identifies contextual information about the query, such as the namespaces in use and what you want for results (entire documents, or document values).
What you then receive back is a result set that is returned in the form of an XmlResults object. You iterate over this result sets in order to obtain the individual documents or values returned as a result of the query.