Q:

PHP Xpath simple search

I'm trying to add two conditions to a search on my XML.
Consider this XML:
<?xml version="1.0"?>
<votes>
  <vote>
    <url>http://www.mydoamin.com</url>
    <ip>xxx.xxx.xxx.xxx</ip>
  </vote>
</votes>

Then I use: 
$xml->xpath("(//votes/vote/[url='Admin' and ip='Group']");

But that give an invalid expression error:
For a single condition this works:
$xml->xpath("(//votes/vote/ip[contains(text(), '$ip')])");

Logic would suggest an AND would worK:
$xml->xpath("(//votes/vote/ip[contains(text(), '$ip')]) & (//votes/vote/url[contains(text(), '$ip')])");

But this fails - Warning: SimpleXMLElement::xpath(): Invalid expression
What am I doing wrong?
A.

A:

Remove / between vote and [.
XPath should look like
//votes/vote[url='Admin' and ip='Group']

