The XPath bookstore/book[1] selects the first book node under bookstore.
bookstore/book[1]
bookstore
How can I select the first node that matches a more complicated condition, e.g. the first node that matches /bookstore/book[@location='US']
/bookstore/book[@location='US']