On 8/20/07, Markus Wolff <[EMAIL PROTECTED]> wrote:
> Am Samstag, den 14.07.2007, 12:38 +0200 schrieb Andries Seutens:
> > Hi all,
> >
> > I have written a small demo app for those of you looking for a quick
> > start with Zend Framework.
> >
> > You can view, and download the demo at:
> > http://andries.systray.be/zf-demos/feed-reader/

Andries,

very nice demo. :) It's good some people take the time to do this.

> Hi Andries,
>
> just like you, I've been trying to write a generalized feed reader using
> Zend_Feed and I just stumbled upon an issue that affects your code as
> well.
>
> IMHO, it should be a design goal for Zend_Feed to be able to easily
> consume any common feed out there. However, I have seen quite a few
> feeds out there that currently can't be handled in a generalized way -
> that is, without writing tons of if/else statements to filter out
> special cases.
>
> Here's an example feed that doesn't work too well with Zend_Feed:
> http://toyflish.de/service/feed.php
>
> When you iterate through the feed items and try to access $item->title()
> or $item->description(), what you'll get instead of the expected string
> is an array with two DOMElement objects. The reason being, that there
> are two of these tags in each item: One with the namespace prefix
> "media" and one without. Check it out with your feed reader code - it
> won't work.

Ouch, that sounds bad. Maybe you can file an issue? What do you think
is the reason though? I mean, your feed looks like all-correct-RSS
(except from the content-type your are sending).

> The problem is: If you don't target a specific feed, you don't know in
> which of these items the relevant information is. You would have to
> check each item and see whether or not it's empty. If both have content,
> you would have to check which one is the media node and which is the
> standard one.

I guess this is where you should:
class myFeed extends Zend_Feed {}

;-)

I think Zend_Feed is already very generic since it parses all/most of
them. But yeah, I agree that the response from Zend_Feed could be more
generic. I haven't tried it myself though.

> (...)

Cheers,
Till

Reply via email to