eXist Xquery Examples[7]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

       re:>返回40

       区别以上例子

      

      

3 多重循环语句

       ex:>

                     for $c in customers

                            for $o in orders     

                     where $c.cust_id=$o.cust_id and $o.part_id="xx"

                     return $c.name

       以上语句等价于sql语句

              select customers.name   from customers, orders

              where customers.cust_id=orders.cust_id  and orders.part_id="xx"

       ex:>

                     for $book in bib.xml//book

                     let $title := $book/title

                     where $book/publisher = 'Addison-Wesley'

                     return

                     <bookInfo>{ $title }</bookInfo>

 

 

[xpath例子]

       greetings.xml:

              <?xml version="1.0" encoding="UTF-8"?>

              <greetings>

                <greeting from="weiqi">Nihao!</greeting>

本文关键:eXist Xquery Examples
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top