A predicate is a way to filter XQuery data that matches a condition in a Path Expression.


Syntax

books.xml

<bookstore>
	<book>
	<name>All about XML</name>
		<price>$20</price>
	</book>
	
	<book>
		<name>Learning XQuery</name>
		<price>$15</price>
	</book>
</bookstore>
Link to original

doc("books.xml")/bookstore/book[price < 20]

Read all books with price under $.