To filter XML queries we need an XPATH and should filter it inside of the path. For instance, in the code below, we can easily select the title of lipstick that has a price element with a value greater than 30.00 in the XML file below with
/drugstore/lipstick[price>30.00]/title
<?xml version="1.0" encoding="UTF-8"?>
<drugstore>
<lipstick>
<title lang="en">Red Velvet</title>
<price>29.99</price>
</lipstick>
<lipstick>
<title lang="en">Pink Passion</title>
<price>39.95</price>
</lipstick>
<lipstick>
<title lang="en">Cherry</title>
<price>25.95</price>
</lipstick>
</drugstore>