XML_Feed_Parser: Now in PEAR

On Monday morning I received noticed that XML_Feed_Parser had been accepted into PEAR. The voting process brought a few useful comments, and the latest version cleans up a few of those issues, including adding a custom Exception class.

You can now find the package’s homepage on the PEAR site and it is also stored in the PEAR CVS repository for those who want to get the latest development version or check the source before downloading. PEAR users can get the latest version with:

% pear install XML_Feed_Parser-alpha

I’m hoping to start adding test cases that use character encodings other than UTF-8 and ISO-8859-1 very soon.

4 comments

  1. Hi.
    i have installed this package and tried using it for reading RSS Feeds. But I am currently using PHP 4.3.1. Is this package being supported only by PHP 5?
    I had a look at the code and saw that the classes implement “Iterator”. Wondering if I would still be able to use on PHP 4.3.1?
    Thanks
    Ankhita

  2. You can try, but the package makes extensive use of the PHP5 DOM implementation and some use of simplexml so it is unlikely to work.

    PHP 4.3.1 is a very old version (it was superceded nearly 29 months ago). The latest stable versions are 4.4.0 and 5.0.5 and you really ought to upgrade.

  3. I just found this package this morning and it sounds impressive. Could you kindly tell us what is its advantages over Magpie RSS ( http://magpierss.sourceforge.net/ ) ? Code cleaner, fully OO,…?

    Magpie RSS is a stand alone class library so it can embed into a existing application easily. XML_Feed_Parser depends on PEAR, which has been seen a slow adoption and are difficult to control in a shared host.

    Magpie has been inactive development for some months and I dont know if its developer can continue his work. I am seeking a alternative to switch.

  4. I don’t want to get into a head-to-head comparison with Magpie as I think the two packages take quite different approaches. This package seeks to abstract the parsing of feeds, and does not provide any caching or http functions since those are better provided by their own specialist packages.

    Being PHP5-only allows the package to take full advantage of the OO functionality and the XML parsing present in PHP5, which I suspect will result in better performance but I don’t yet have any benchmarks on that.

    It does depend on PEAR for its installation and exception handling, but PEAR is installed as standard with all recent versions of PHP. PEAR can be a pain where you don’t have shell access, but I use it successfully on a couple of shared hosting accounts where I do have shell access.

    Since all the package requires is PEAR_Exception it shouldn’t be too hard to get it up and running so long as there’s a bare bones PEAR installation on the server, but I will consider releasing a separate version of the package which removes the requirement on PEAR_Extension for those who really don’t want to install it on PEAR.

    On the other hand, I’d recommend PEAR modules for providing HTTP and caching functionality, so for those looking for a full feed download/parse solution a standalone package would be of limited use.