In my php script, I try to parse a online – xml file.
That´s how I load it into my script:
$xml = simplexml_load_file($filename);
Now, I want to make a test output. I try it with
echo $xml->title;
but there is no result. When I try print_r($xml) I get the right XML file.
It looks like that:
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>testtitle</title>
and so on
Why is there no result?
It is because of the nesting of the elements.
So if u use:
That will output your title