Forum Moderators: open
and wanted to output the heading tag with:
<?
require_once 'rss_fetch.inc';
$url = 'http://www.example.com/xml/note.xml';
//$url = 'http://rss.news.yahoo.com/rss/topstories';
$rss = fetch_rss($url);
foreach ($rss->items as $item ) {
echo $item[heading]."<BR>";
}
?>
But there is only a white screen. No error message, nothing.
When I use the yahoo rss and take description for heading everything runs fine.
Does anybody know why this hapens?
Thanks for your reply guys.
Baron
[edited by: werty at 11:47 pm (utc) on Nov. 11, 2006]
[edit reason] removed specifics from URL - please see TOS #13 [/edit]
[edited by: werty at 11:46 pm (utc) on Nov. 11, 2006]
[edit reason] removed specifics from URL - please see TOS #13 [/edit]
I know you need to parse xml, not just rss, so while reading the article, if you choose to do it this way, you would replace the title, item, description, etc tags with the names of the tags you want from your xml file.
Other than that, maybe someone else can help you with a true xml parser.