0
<item>
  <title>Bazinga !</title>
  <ext:originalFilename><![CDATA[BVT-ch4-pt18.mp4]]></ext:originalFilename>
</item>

I was using SimpleXmlElement to parse feed, now the feed is changed and am no longer able to retreive originalFilename from the feed. I am using this right now

$xml = new SimpleXmlElement($feed);

But this $xml doesnt have data about originalFilename. How can i Get the CDATA as well.

GoodSp33d
  • 6,252
  • 4
  • 35
  • 67

1 Answers1

0

This issue has been seen before. You must register the namespaces you are using, check out this SO question: Parse XML with Namespace using SimpleXML

Community
  • 1
  • 1
Tchoupi
  • 14,560
  • 5
  • 37
  • 71
  • Yes I am registering namespace s `$xml->registerXPathNamespace('c', 'http://search.yahoo.com/mrss/'); $xml->registerXPathNamespace('e', 'http://myvideoprovider.com/syndication/ext/');` – GoodSp33d Apr 27 '12 at 15:09
  • It was not in your question :) Can you edit with the complete code? – Tchoupi Apr 27 '12 at 15:11