Extracting data from a XML feed with simplexml_load_file

93gsg

New Member
I'm trying to extract data from a XML feed using simplexml_load_file. This is what I have now:\[code\] <?php $anobii = simplexml_load_file('http://www.anobii.com/rss_shelf?s=01fe251a6c442bbf8a'); foreach ($anobii->entry as $anobiiinfo): $title=$anobiiinfo->rss->channel->item->title; $desc=$anobiiinfo->rss->channel->item->description; echo "<span> ",$title,"</span><br><span> ",$desc,"</span>"; endforeach; ?>\[/code\]The problem is that I don't know the right separators to tell the script the portions it needs to extract (rss->channel->item->title)... do you know what's wrong here? Thanks in advance! :)
 
Back
Top