PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » XML » XML_RSS » Bug #6747

parse() not returning any content

Details

Submitted2006-02-10 18:21 UTC
Fromrgwin at drivetheweb dot com
StatusBogus
PackageXML_RSS
PHP Version4.4.0
OSOSX and RH Linux
Roadmaps(Not assigned)

Comments

[2006-02-10 18:21 UTC] rgwin at drivetheweb dot com

Description:
------------
I am trying to use the beta (0.9.9) XML_RSS parser work, using the implementation example from the documentation. Works fine with 0.9.2, but parse() generates no content with 0.9.9. Is there an undocumented change in implementation?

Note that in my examples I am outputting getItems(), but I also tried a print_r($rss) directly after the $rss->parse(), and could see that the 0.9.2 object had content and the 0.9.9 object didn't. So it's happening that early. That example was too messy to include here though.

Test script:
---------------
//require_once "XML_RSS-0.9.2/RSS.php"; // works
require_once "XML_RSS-0.9.9/RSS.php"; // doesn't work

$rss =& new XML_RSS("http://slashdot.org/slashdot.rdf");
$rss->parse();

echo count($rss->getItems()) . " Items:\n";

foreach ($rss->getItems() as $item){
echo $item['title'] . "\n";
}

Expected result:
----------------
10 Items:
Oracle to buy JBoss (and others)
Internet Radio Failing to Find Support?
Inside the BlackBerry Workaround
PlayStation 3 May Play Too Much
Newest Patent Threat to MPEG-4
Moore Calls Game Discs Ridiculous
Limited Email Surveillance Approved
Scaremongering over Spyware?
Oracle to Layoff 2000 Jobs
Apple Gifts Top WebKit Contributors with MacBooks

Actual result:
--------------
0 Items:

[2006-02-10 18:24 UTC] rgwin at drivetheweb dot com

oops, please substitute "make" for "use" in my first sentence.. or remove "work" ;)

[2006-02-11 18:44 UTC] rgwin at drivetheweb dot com

My mistake. I had to upgrade to the latest XML_Parser.