I'm having two problems. Getting XPATH to work with atom namespace and getting data from a CDATA field.
The xml that I have looks like
<?xml version="1.0" encoding="UTF-8" ?>
<entry xmlns="http://www.w3.org/2005/Atom" xmlns:kml="http://www.opengis.net/kml/2.2">
<title type="text"><![CDATA[Hello World]]></title>
</entry>
While my PHP looks like
$xml = new SimpleXMLElement(file_get_contents($this->xmlFile));
$xml->setAttributeNS( "http://www.w3.org/2005/Atom");
$xml->registerXpathNamespace('kml' , 'http://www.opengis.net/kml/2.2');
$result = $xml->xpath('/entry/title');
var_dump($result);
Removing the atom namespace from the XML allows my xpath to work. But how do I get simplexml to accept atom as a namespace? Also when I do get data (without atom) I can't get the text because it's formatted as CDATA, how can I get show the CDATA text?