This is what I have:
$namex = $xml->xpath("//a[@b=foo]/c");
$name = $namex[0];
echo $name;
It works, as the first line creates an array and the second line reads the first entry. Is there a way to combine the two lines to get the intended result right away?