Versionsvergleich
Aus ProgrammingWiki
Vergleich: 2011-12-11T08:40:43+00:00 → 2012-02-03T19:07:18+00:00
<language>XQuery</language> | |
| + | Eine ausführliche Einführung in XQuery mit Beispielen im Wiki findet sich hier: [[Einf%C3%BChrung_in_die_XML-Technologien_XPath,_XSLT_und_XQuery/XQuery|XQuery]] |
<code id="4acaeb59ab833"> | |
<bookstore> | |
<book category="COOKING"> | |
<title lang="en">Everyday Italian</title> | |
<author>Giada De Laurentiis</author> | |
<year>2005</year> | |
<price>30.00</price> | |
</book> | |
<book category="CHILDREN"> | |
<title lang="en">Harry Potter</title> | |
<author>J K. Rowling</author> | |
<year>2005</year> | |
<price>29.99</price> | |
</book> | |
<book category="WEB"> | |
<title lang="en">XQuery Kick Start</title> | |
<author>James McGovern</author> | |
<author>Per Bothner</author> | |
<author>Kurt Cagle</author> | |
<author>James Linn</author> | |
<author>Vaidyanathan Nagarajan</author> | |
<year>2003</year> | |
<price>49.99</price> | |
</book> | |
<book category="WEB"> | |
<title lang="en">Learning XML</title> | |
<author>Erik T. Ray</author> | |
<year>2003</year> | |
<price>39.95</price> | |
</book> | |
</bookstore> | |
</code> | |
<run id="4ab0f6356b98a"> | |
for $x in //bookstore/book | |
where $x/price>30 | |
order by $x | |
return $x/title | |
</run> | |
<run id="4ab0f2fda8569">//bookstore/book[price<30]</run> | |
<run id="4ac05902eab7e"> | |
<ul> | |
{ | |
for $x in //bookstore/book/title order by $x | |
return <li>{$x/text()}</li> | |
} | |
</ul> | |
</run> |