A path expression is used in XQuery to select XML elements.
Syntax
books.xml
Link to original <bookstore> <book> <name>All about XML</name> <price>$20</price> </book> <book> <name>Learning XQuery</name> <price>$15</price> </book> </bookstore>
doc("books.xml")/bookstore/book/name
Read the name
of all book
s with a path expression.
doc("books.xml")//name
Read all the name
elements.