ZF-3128: Zend_Feed_Rss::__wakeUp improvement
Description
Hi,
First, this is my first post... If something is wrong in my issue tracker usage, let me know. Actually, Zend_Feed can't read del.icio.us feed, because it uses RSS 1.0. So I improve Zend_Feed_Rss::__wakeUp method as below:
// Check for RSS 1.0 feed
if ($doc->getElementsByTagName('RDF')->item(0)) {
$this->_element = $doc->getElementsByTagName('RDF')->item(0);
} else {
// Find the base channel element and create an alias to it.
$this->_element = $doc->getElementsByTagName('channel')->item(0);
}
if (!$this->_element) {
/**
* @see Zend_Feed_Exception
*/
require_once 'Zend/Feed/Exception.php';
throw new Zend_Feed_Exception('No root or element found, cannot parse channel.');
}
The changes are in the 'RDF' item check and in the Zend_Feed_Exception message. Hope this is useful and apologize for any errors.
Comments
Posted by julien PAULI (doctorrock83) on 2008-04-17T12:18:50.000+0000
(you should use the ``` style in the bug tracker, to make your code more readable, see http://framework.zend.com/issues/secure/… )
Posted by julien PAULI (doctorrock83) on 2008-04-17T12:20:11.000+0000
lol, I meant the { code } block (if I write it, it wouldnt get shown, how silly I feel .... )
Posted by LF Bittencourt (bittencourt) on 2008-04-17T13:30:31.000+0000
I guess the better way to correct this trouble is create a new class to read RSS 1.0/RDF feeds adequately, cause the changes I made generate some wrong behaviors. See below:
So I'm creating a class Zend_Feed_Rss-based. How new classes can be submitted to ZF?
Posted by Wil Sinclair (wil) on 2008-04-18T13:25:24.000+0000
Please evaluate and categorize as necessary.
Posted by Simone Carletti (weppos) on 2008-05-06T00:56:53.000+0000
There is much more in Zend_Feed to be changed to make the library compatible with RSS 1.0 (and RDF based) files.
Zend_Feed not only consumes feeds, but creates them as well. I exposed a list of common issues to care of in ZF-405.
To not split discussions and lost valuable suggestions, I would flag this issue as duplicate of ZF-405. What do you think?
Posted by Simone Carletti (weppos) on 2008-05-13T15:10:38.000+0000
Closing as duplicate of ZF-405.