Model structured documents with elements, attributes, namespaces, schemas, parsing, and transformations.
Lessons
Query and build XML with FLWOR expressions.
XQuery Introduction is easiest to learn by reading the example, changing it, and observing the result.
(: FLWOR: For, Let, Where, Order by, Return :)
for $lesson in doc("lessons.xml")//lesson
let $title := $lesson/title
where $lesson/@level = "beginner"
order by $title
return <item>{ string($title) }</item>Practice the XQuery Introduction example in a small scratch file, then explain what changed and why.