MagpieRSS library archives discussion

Events happening in the community are now at Drupal community events on www.drupal.org.
budda's picture

For newcomers to the RSS topic I dug out an old thread from the Drupal mailing list which discusses the use of MagpieRSS library in Drupal. Interesting read - it was before my time.

http://lists.drupal.org/archives/development/2004-07/msg00400.html

Comments

SimplePie?

budda's picture

Alf Eaton has brought http://simplepie.org to my attention as a more streamlined RSS/ATOM parser that could be used. I've got some code from him that works in the Feedparser system.

But would Simplepie ever get a look in for Drupal core in the future?

Unlikely

boris mann's picture

Dries does not believe parsing to be a particularly difficult task, and I actually think he wrote the base parsing in Drupal.

Are there specific things that core parsing doesn't handle?

PHP 5

hickory-gdo's picture

I'm also using the version of SimplePie that requires PHP5, just because PHP5's XML handling is much easier to work with. This makes it even less suitable for inclusion in core. However, if the FeedParser module abstracted away from the parsing enough that you could switch parsing modules as desired (using a core parser.inc, SimplePie.inc, Magpie.inc, or whatever), then that would be the ideal situation.

I've thought a little about

budda's picture

I've thought a little about abstracting awaythe actual parser include. But what is the actual benefit ? Would it not be better maybe to just have one solid working parser - which maybe benefits from borrowing pieces of other libraries where needed.

A minimum of PHP5 requirement does put a bit of a spanner in the works.

There is a PHP4 version of

hickory-gdo's picture

There is a PHP4 version of SimplePie as well. I just think it would be nice to have a choice of parsing engine, seeing as there are so many different ones being developed.

Magpie 2.0

Anonymous's picture

There's a new version of Magpie being worked on as well, released today as an alpha version. It's nicely divided into separate includes, for HTTP, caching, parsing and Magpie functions

Compared to Drupal's core parser, SimplePie provides a lot of functions for getting - for example - the enclosures for an item, or an item's permalink, rather than just breaking all the elements down into an array and letting you do all the parsing yourself.

Ideally a feedparser module would use includes for fetching and caching the feed data (see Magpie), then an include for parsing the feeds and normalising between different feed formats, which would reurn an array or object of feed and item data. It may also be useful to allow other modules to hook into the parsing routines, so that they could add extra functions for data and namespaces not covered by the core parser.

RSS & Aggregation

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: