- and
- tags to the FLWOR expression:
-
{
for $x in doc("books.xml")/bookstore/book/title
order by $x
return
- {$x} }
Everyday Italian Harry Potter Learning XML XQuery Kick Start
-
{
for $x in doc("books.xml")/bookstore/book/title
order by $x
return
- {data($Geek Time Cashbackx)} }
- Everyday Italian
- Harry Potter
- Learning XML
- XQuery Kick Start
Xquery Flwor Html
# XQuery FLWOR + HTML
* * *
## XML Example Document
We will continue to use this "books.xml" document in the following examples (same file as in the previous section).
[View the "books.xml" file in your browser](#).
* * *
## Presenting Results in an HTML List
Look at the following XQuery FLWOR expression:
for $x in doc("books.xml")/bookstore/book/title
order by $x
return $x
The above expression selects all title elements under the book elements under the bookstore element and returns the title elements in alphabetical order.
Now, we want to list all the book titles in our bookstore using an HTML list. We add
YouTip