it does work without registerXPathNamespace
and the full namespace prefix in the xpath queries:
$xml = new SimpleXMLElement($r);
foreach($xml->xpath('//event:event') as $event) {
var_export($event->xpath('event:sessionKey'));
}
More Related Contents:
- PHP library for parsing XML with a colons in tag names? [duplicate]
- PHP namespace simplexml problems
- SimpleXML: Working with XML containing namespaces
- SimpleXML SOAP response Namespace issues
- How to get attribute of node with namespace using SimpleXML? [closed]
- Accessing @attribute from SimpleXML
- Remove a child with a specific attribute, in SimpleXML for PHP
- SimpleXML: Selecting Elements Which Have A Certain Attribute Value
- Simple XML – Dealing With Colons In Nodes
- How to use XMLReader in PHP?
- Forcing a SimpleXML Object to a string, regardless of context
- How to get the value of an attribute from XML file in PHP?
- parse an XML with SimpleXML which has multiple namespaces [duplicate]
- Implementing condition in XPath [duplicate]
- How to write CDATA using SimpleXmlElement?
- How can I set text value of SimpleXmlElement without using its parent?
- Using SimpleXML to read RSS feed
- PHP SimpleXML: insert node at certain position
- Best way to process large XML in PHP [duplicate]
- ‘xmlParseEntityRef: no name’ warnings while loading xml into a php file
- Using SimpleXML to load remote URL
- Loop through an XML object with SimpleXML
- PHP convert XML to JSON group when there is one child
- simplexml error handling php
- PHP SimpleXML Namespace Problem
- PHP, SimpleXML, decoding entities in CDATA
- edit XML with simpleXML
- PHP SimpleXML + Get Attribute
- How to save changed SimpleXML object back to file?
- How to import XML string in a php DOMDocument