Feed Parser: First Beta

I promised more work on XML_Feed_Parser this month and am pleased to say I found the time. The first beta, version 0.3, is on its way into PEAR.

Two key developments in this version are support for the ‘content’ module in RSS2 and fix of a serious bug in the main __call method. I was accessing the compatMap variable (that handles the mapping of element names between different syndication formats) directly, and calling array_pop on it. That threw up problems if you wanted to access the same element multiple times, so I’ve added in a temporary variable to fix that.

The main development, however, is experimental support for the tidy library. If you think (or know) the feed you’re working with might not be valid XML, you can now choose to have tidy clean up the code before it gets handed to the DOM. Handling ill-formed XML is a much requested feature, and initial testing of this solution yields positive results.

Tags: , , , , , ,

2 comments

  1. I’d really loved to be able to use this package, however i have not figured out how or what i have to do to get the getcategory working, can you please post or email me a detailed way to use this?

  2. What have you tried? If you post a code sample here I can take a look and see if it should work.

    fyi, none of the get*() functions are designed to be called directly. For categories you should be calling the category() method.