2
12
3
13
ex:>for $speech in document("/db/tonybooks/Catalog.xml")//categoryName
return <br/>{$speech}
re:>略
ex:>
<html>{
let $book := document("mybook.xml")/book
for $ch in $book/chapter
return <h2>{$ch/title)</h2>
}</html>
re:>略
6 使用text(),返回内容
ex:>let $book:=document("examples.xml")/example-queries/query
return $book/code/text()
ex:>let $doc := document("examples.xml")//query/code/text()
return $doc
[函数的定义与调用]
ex:>