I am trying to read yahoo rss (http://news.yahoo.com/rss/us) in php using xml function
this is my simple code:
$xml = simplexml_load_file('xml.xml');
var_dump($xml['channel']);
but I show NULL :
adam@cka: php test.php
NULL
is my xml broken? or is there a better function in php for reading an xml file?
I see that elment exists in the XML file, and I downloaded the file correctly on my computer.
source
share