Sign In/My Account | View Cart  
advertisement

Article:
 What Is XQuery
Subject: Newbie to XQuery
Date: 2003-03-23 10:17:25
From: Mehran Zonouzi

Hi,


I am completely new to XQuery..
I have the following which I would like to run on an .xml file...


for $book in bib.xml//book
let $title := $book/title
where $book/publisher = 'Addison-Wesley'
return

<bookInfo>
{ $title }

</bookInfo>


and the bib.xml file
<bib>
<book year="1994">
<title>TCP/IP Illustrated</title>
<author><last>Stevens</last><first>W.</first></author>
<publisher>Addison-Wesley</publisher>
<price> 65.95</price>
</book>

<book year="1992">
<title>Advanced Programming in the Unix environment</title>
<author><last>Stevens</last><first>W.</first></author>
<publisher>Addison-Wesley</publisher>
<price>65.95</price>
</book>

<book year="2000">
<title>Data on the Web</title>
<author><last>Abiteboul</last><first>Serge</first></author>
<author><last>Buneman</last><first>Peter</first></author>
<author><last>Suciu</last><first>Dan</first></author>
<publisher>Morgan Kaufmann Publishers</publisher>
<price>39.95</price>
</book>

<book year="1999">
<title>The Economics of Technology and Content for Digital TV</title>
<editor>
<last>Gerbarg</last><first>Darcy</first>
<affiliation>CITI</affiliation>
</editor>
<publisher>Kluwer Academic Publishers</publisher>
<price>129.95</price>
</book>

</bib>


What exactly do I have to do to run this query?




Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First
  • Newbie to XQuery
    2003-03-23 13:10:35 Per Bothner

    Try this URL for information on using the Qexo implementation of XQuery:
    http://www.gnu.org/software/qexo/Running.html


Sponsored By: