Query with multiple variables

Create a list of all the title-author pairs, with each pair enclosed in a result element.

   for $book in doc("bib.xml")/bib/book,
     $title in $book/title,
     $author in $book/author
    { $title }
    { $author }

Adapted from XML Query Use Cases

Previous | Next | Top | Cafe con Leche | Cafe au Lait

Copyright 2002-2005 Elliotte Rusty Harold
Last Modified January 18, 2004