title: XPATH: Selecting multiple records with Wildcard Namespaces
body: <p>I am fairly new to XPATH and need to return a value from multiple XML objects when a certain node is equal to one of two values. The solution also needs to be namespace agnostic using local-name(). Given the following XML, I am looking to return all of the values of "B" where "A" is equal to either "4" or "5".</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
      &lt;element&gt;
          &lt;A&gt;3&lt;/A&gt;
          &lt;B&gt;Value 1&lt;/B&gt;
      &lt;/element&gt;
      &lt;element&gt;
          &lt;A&gt;4&lt;/A&gt;
          &lt;B&gt;Value 2&lt;/B&gt;
      &lt;/element&gt;
      &lt;element&gt;
          &lt;A&gt;5&lt;/A&gt;
          &lt;B&gt;Value 3&lt;/B&gt;
      &lt;/element&gt;
  </code></pre>
  
  <p>I have tried many iterations of the following expression but cannot seem to get the syntax correct when I try to add the second value for "A". I just can't seem to figure out the correct syntax for an "or" expression. I have also considered the use of a union and couldn't get that syntax correct either.</p>
  
  <p>This works for when "A" equals a single value of "4" but how to I add the test for a value of "5" so that the result returns two values for "B" ("Value 2" and "Value 3")?</p>
  
  <pre><code>//*[local-name()='element'][*[local-name()='A']='4']/*[local-name()='B']/text()
  </code></pre>
  
  <p>Thank you. Any help would be very much appreciated!</p>