title: XPath with multiple contains on different elements
body: <p>Is it possible to have <code>XPath</code> expression with multiple contains of different element values?</p>
  
  <p><strong>XML</strong></p>
  
  <pre><code>&lt;data&gt;
     &lt;person&gt;
        &lt;firstname&gt;Kerry&lt;/firstname&gt;
        &lt;lastname&gt;Packer&lt;/lastname&gt;
        &lt;address&gt;Crown&lt;/address&gt;
     &lt;person&gt;
     &lt;person&gt;
        &lt;firstname&gt;Kerry&lt;/firstname&gt;
        &lt;lastname&gt;Murdoch&lt;/lastname&gt;
        &lt;address&gt;California&lt;/address&gt;
     &lt;person&gt;
  &lt;data&gt;
  </code></pre>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>$xml = simplexml_load_string($data);
  $elements = $xml-&gt;xpath("(//person)[firstname[contains(., 'Kerr')]] and [lastname[contains(., 'och')]]");
  </code></pre>
  
  <p>Currently above <code>XPath</code> expression is flagged as invalid. However if I use it with one element, </p>
  
  <pre><code>$xml-&gt;xpath("(//person)[firstname[contains(., 'Kerr')]]"); 
  </code></pre>
  
  <p>then it works fine.</p>