List books published by Addison-Wesley after 1993, including their year and title:
<bib>
FOR $b IN document("http://www.bn.com")/bib/book
WHERE $b/publisher = "Addison-Wesley" AND $b/@year > 1993
RETURN
<book year = $b/@year>
$b/title
</book>
</bib>
This is not well-formed XML!
Adapted from XML Query Use Cases