You are here:  » blogger atom.xml


blogger atom.xml

Submitted by sleslie on Mon, 2007-02-05 21:12 in

cannot get the CONTENT to work...

TITLE and LINK-HREF work but I can get no content to appear help!

Code below:

<?php
  
require("MagicParser.php");
  function 
myRecordHandler($item)
  {
    global 
$counter;
    print 
"<h2><a href='".$item["LINK-HREF"]."'>".$item["TITLE"]."</a></h2>";
    print 
"<p>".$item["CONTENT"]."</p>";
    
$counter++;
    return (
$counter == 3);
  }
  
MagicParser_parse("http://www.pricechecker.co.uk/blog/rss.xml","myRecordHandler","xml|FEED/ENTRY/");
?>

Submitted by support on Mon, 2007-02-05 21:17

Hi,

I've just looked at the feed, and in that particular format there is no "CONTENT" field. Instead, the main body of each record is called "SUMMARY", so the following should work:

<?php
  
require("MagicParser.php");
  function 
myRecordHandler($item)
  {
    global 
$counter;
    print 
"<h2><a href='".$item["LINK-HREF"]."'>".$item["TITLE"]."</a></h2>";
    print 
"<p>".$item["SUMMARY"]."</p>";
    
$counter++;
    return (
$counter == 3);
  }
  
MagicParser_parse("http://www.pricechecker.co.uk/blog/rss.xml","myRecordHandler","xml|FEED/ENTRY/");
?>

Hope this helps!
Cheers,
David.

Submitted by sleslie on Mon, 2007-02-05 21:28

so it is !

couldn't see the wood for the trees!

Thanks