Am Montag, den 20.08.2007, 14:07 +0200 schrieb till:
> > 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).
It's not my feed, I do not control that site. If I did, there would not
be a problem :-)
> > 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.
The problem is when you don't know in advance which feed you will be
consuming. If the goal is to just type in an arbitrary feed URL, you
currently have no way of ensuring your code will work with all thinkable
feed types. I'm not asking for something that will always work as
intended - just something that always returns some kind of output you
can rely on, be it just an empty string. IMHO it's better for the end
user to see an empty line than to see something like "Array" where you
would expect a title or description.
CU
Markus