Am Montag, den 20.08.2007, 13:46 +0200 schrieb Markus Wolff:
> 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.
> 
> 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.
> 
> The above feed is not the only one causing problems. Try
> http://feeds.feedburner.com/Techcrunch, for example, and try to get the
> feed link:
> $techCrunchFeed = 'http://feeds.feedburner.com/Techcrunch';
> $feed = new Zend_Feed_Rss($techCrunchFeed);
> print_r($feed->link());

Just found another one that causes problems:

http://www.planet-php.net/atom

Problem here is that when you try to get the link for an entry, an empty
string is returned:

$feed = new Zend_Feed_Atom('http://www.planet-php.net/atom');
foreach($feed as $item) {
    echo $item->link()."\n";
}

The items do have links, though, but the link tag itself does not
contain any text:

<link rel="alternate" type="text/html"
href="http://blog.ulf-wendel.de/?p=155"; title="PHP: mysqlnd can&#x2019;t
do wonders"/>

Instead, the link is within the href attribute - the feed reader doesn't
seem to check for that, which is yet another thing that I would expect a
feed reader class to do.

CU
 Markus

Reply via email to