Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
XML
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
Posted
Updated 13-Apr-15 7:15am
v2

1 solution

You asked the same question on SO[^]. There are 2 answers! Please, do some effort before you ask another question. When you get stuck come back here and ask detailed question. Don't be lazy! Follow the link to the documentation.
 
Share this answer
 
Comments
jony hernandez 13-Apr-15 23:01pm    
if I wasn't struggling I wouldn't ask!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900