to the main page about the tutorial  THE XML REVOLUTION  -  TECHNOLOGIES FOR THE FUTURE WEB back up next

Path expressions

The simplest kind of query is just an XPath 2.0 expression.

A simple path expression looks like:

document("recipes.xml")//recipe[title="Ricotta Pie"]//ingredient[@amount]

The initial context for the path expression is given by document("recipes.xml") (similarly to XPointer).

Some XQuery specific extension of XPath:

back COPYRIGHT © 2000-2003 ANDERS MØLLER & MICHAEL I. SCHWARTZBACH next