How to use AND operator in XPath?
<p>XML is like</p>

<pre><code> &lt;a id="1"&gt;
   &lt;b&gt;value1&lt;/b&gt;
   &lt;b&gt;value2&lt;/b&gt;
 &lt;/a&gt;
</code></pre>

<p>I want to write XPath to find id of <code>&lt;a&gt;</code> where there will be two <code>&lt;b&gt;</code> child nodes having fix value <code>value1</code> and <code>value2</code>. I tried to to find out XPath with condition like</p>

<pre><code>$xml-&gt;xpath('*[b=value1] | *[b=value2]');  
</code></pre>

<p><code>value1</code> and <code>value2</code> are present in <code>&lt;b&gt;</code> node, but I can not get exactly as I am using XPath first time.</p>