title: How can I get the value of a child node from the conditions of its sibling
body: <p>I'm trying to use the value of the <code>name</code> node to get back the <code>location</code> or other sibling nodes in the code below</p>
  
  <pre><code>var xmlString ="&lt;stock&gt;&lt;item&gt;&lt;name&gt; jacket &lt;/name&gt;&lt;price&gt; 10 &lt;/price&gt;&lt;location&gt; lat: 31.956624, lng: 35.860534&lt;/location&gt;&lt;/item&gt;&lt;item&gt;&lt;name&gt; shirt &lt;/name&gt;&lt;price&gt; 5 &lt;/price&gt;&lt;location&gt; lat: 31.938761, lng: 35.887909&lt;/location&gt;&lt;/item&gt;&lt;item&gt;&lt;name&gt; shoes&lt;/name&gt;&lt;price&gt; 40&lt;/price&gt;&lt;location&gt; lat: 31.981340,lng: 35.839020&lt;/location&gt;&lt;/item&gt;&lt;/stock&gt;"
          var myParser = new DOMParser();
  
          var xmlObject = myParser.parseFromString(xmlString, "text/xml") 
  
          var xmlResults = document.evaluate("/stock/item/name[contains(text(), 'jacket')]", xmlObject, null, XPathResult.ANY_TYPE, null);
  
          var singleResult = xmlResults.iterateNext();
  
          while (singleResult){
              console.log(singleResult.textContent);
              singleResult = xmlResults.iterateNext();
          }
  </code></pre>
  
  <p>The above text will just return <code>jacket</code>.
  What I need is to use <code>jacket</code> or other <code>name</code> value to return the values of siblings of <code>name</code>
  e.g. input jacket into search form and get coordinates to use it to place a pin on a map.</p>