I have this as xml:
&
You have to register the namespace for each simpleXMLElement object you use.
$xml = new SimpleXMLElement($r);
$xml->registerXPathNamespace('e', 'http://www.webex.com/schemas/2002/06/service/event');
foreach($xml->xpath('//e:event') as $event) {
$event->registerXPathNamespace('e', 'http://www.webex.com/schemas/2002/06/service/event');
var_export($event->xpath('//e:sessionKey'));
}
The namespace should also be declared somewhere in the xml file.
...
The method ax described works too. You can skip the registerXPathNamespace if you know the xml file will always use the same prefix.