Skip Site Navigation «

DRX

app«drx

Web Developer Resource Index: XQuery

XQuery is a language for extracting data from XML sources. This is similar in concept to how SQL is designed to retrieve data in a RDBMS. However, XQuery uses XPath expressions to traverse the tree structure of an XML document, rather than the SQL model based on rows and columns of data stored in tables that are related.

The root of any XQuery expression is the doc() function used to open an XML document. If this application was stored as XML (which it isn’t, I’m using MySQL at the moment), a possible query to match one record on this page might look like:

doc('drx.xml')/resources/category/ \ XQuery[title='An Introduction to XQuery']

And would theoretically return An Introduction to XQuery.

If you have some experience with SQL, you should be able to see that this is a very simple example that selects a single record. XQuery uses more powerful expressions known as FLWOR, which are the equivalent of the SQL SELECT FROM HAVING WHERE model.

It is beyond the scope of this brief introduction to delve into any additional discussion of XQuery. Consult the resources below for more information.

Updated: Wednesday, August 17th, 2005 @ 11:35 PM EDT [16]

Navigation

Resources

Matching Tags

Indexes

§ A.Author
§ B.Best
§ D.Domain
§ F.Recent
§ G.Tag
§ H.Title

Search for XQuery on:


Last updated: Wednesday, August 17th, 2005 @ 11:35 PM EDT [2005-08-18T03:35:53Z]   home

(c) 2006-2008, Douglas W. Clifton, loadaveragezero.com, all rights reserved.