Rob Richards kindly sent me the following response via email - posting it here
as he's not subscribed.
You need to register a namespace for XPath since there's a default
namesapce.
$xml = simplexml_load_file('test.xml');
/* Register arbitrary namesapce prefix for xpath*/
$xml->registerXPathNames
, when:
$query = '//ItemLookupResponse';
var_dump returns:
array(0) {
}
Either a) I'm doing something terribly wrong (and I thought that I was
attempting a pretty
simple xpath query) or b) SimpleXML's broken.
I'd prefer a) - it's easier to fix :)
Thank
2 matches
Mail list logo