import module namespace parse-xml = "http://www.zorba-xquery.com/modules/xml"; import schema namespace opt = "http://www.zorba-xquery.com/modules/xml-options"; import module namespace fetch = "http://www.zorba-xquery.com/modules/fetch"; variable $xmlcontents := fetch:content("wiki.xml" ); (: Note: using this instead of pars-xml:parse works... let $contents := fn:parse-xml($xmlcontents) :) let $contents := parse-xml:parse( $xmlcontents, ) for $article at $pos in $contents let $title := trace($article//title, "title") return $title