How to shuffle an array in JavaScript?
How to shuffle an array in JavaScript?
March 22, 2022
The most efficient way to delete both in Vim and Shell
The most efficient way to delete both in Vim and Shell
April 5, 2022

March 29, 2022

How to select a specific node that contains a specific value?

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>
How to select a specific node that contains a specific value?
This website uses cookies to improve your experience. By using this website you agree to our Data Privacy Statement
Read more