This time we will talk about XQuery
for $x in doc("books.xml")/bookstore/book
where $x/price>30
order by $x/title
return $x/title
<ul>
{
for $x in doc("books.xml")/bookstore/book/title
order by $x
return <li>{$x}</li>
}
</ul>
let $sum := sum(doc("books.xml")/bookstore/book/price)
return <ul>
{
for $x in doc("books.xml")/bookstore/book/title
order by $x
return <li>{$x}</li>
}
<li>Order x, total sum {$sum}</li>
</ul>
Btw nice tutorial is here: https://www.tutorialspoint.com/xquery/index.htm