本文介绍了来自xml文件的xquery retreive数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I would like to find all libraries with same number of books availbles and as many as empty shelves as the library called "Oxford".
<librarycollections>
<library>
<id>1</id>
<library_name> oxford <library_name>
<name>DBMS</name>
<availble_books>2</availble_books>
<empty_shelves>5</empty_shelves>
</library>
for $x in doc("filename.xml")/librarycollections/library/
where $x/@available_books = available_books and $x/empty_shelves ="oxford"
retunrn...
The result I'm trying to get is like this :
Empty shelves/number of books/ library name
<li>2 empty, 8 bookes @ Greenwich library </li>
<li>5 empty, 8 bookes @ UCL library </li>
Appreciate any help.
Thank you
推荐答案
这篇关于来自xml文件的xquery retreive数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!