Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.0

Bug #3871 Multiple tags skipped; Channel tags lost; Atributes skipped
Submitted: 2005-03-18 13:30 UTC
From: netkot at mail dot ru Assigned: mj
Status: No Feedback Package: XML_RSS
PHP Version: 4.3.10 OS: Windows/Unix
Roadmaps: (Not assigned)    
Subscription  


 [2005-03-18 13:30 UTC] netkot at mail dot ru
Description: ------------ Tags 'category' and 'enclosure' could be multiple. Parser takes only the first ones. After the image-tag in the channel-tag there could be several other tags, which are not taken (lastBuildDate, language, ttl and so) - see the code. And the tags with attibutes are not taken, such as 'enclosure'. Is it planned to make the class supporting RSS 2.0? Reproduce code: --------------- <?xml version="1.0" encoding="windows-1251"?> <rss xmlns="http://backend.userland.com/rss2" xmlns:yandex="http://news.yandex.ru" version="2.0"> <channel> <title>ÂèíÒÀ</title> <link>http://www.vinta.info/</link> <description>ëåíòà íîâîñòåé</description> <image> <url>http://www.vinta.info/_data/objects/00001/site_logo.gif</url> <link>http://www.vinta.info/</link> <title>Âîëæñêîå èíôîðìàöèîííîå òåëåãðàôíîå àãåíòñòâî ÂèíÒÀ</title> </image> <lastBuildDate>Fri, 18 Mar 2005 13:21:34 +0300</lastBuildDate> <language>ru-ru</language> <ttl>60</ttl> <generator>TreeGraph 3.6 (tm) http://treegraph.nino.ru/</generator> <item> <title>×åðíóþ äûðó â ëàáîðàòîðíûõ óñëîâèÿõ ñîçäàëè àìåðèêàíñêèå ó÷åíûå</title> <link>http://www.vinta.info/?id=15044</link> <description>Åå òåìïåðàòóðà â 300 ìèëëèîíîâ ðàç ïðåâûñèëà òåìïåðàòóðó Ñîëíöà</description> <pubDate>Fri, 18 Mar 2005 11:06:00 +0300</pubDate> <category>ÎÁÙÅÑÒÂÎ</category> <category>ÏÎËÈÒÈÊÀ</category> <enclosure url="http://www.vinta.info/_data/objects/15044/icon.jpg" type="image/jpeg"/> <enclosure url="http://www.vinta.info/_data/objects/15044/view_icon_photo.jpg" type="image/jpeg"/> </item> </channel> </rss>

Comments

 [2005-05-25 11:15 UTC] alex at waste dot me dot uk
This package appears to be aging quite rapidly, perhaps it needs a new maintainer? I wrote a quick patch to add support for enclosures for a project I'm doing: 67a68,73 > var $attribs = array(); > > > /** > * @var array > */ 94c100 < var $itemTags = array('TITLE', 'LINK', 'DESCRIPTION', 'PUBDATE'); --- > var $itemTags = array('TITLE', 'LINK', 'DESCRIPTION', 'PUBDATE', 'ENCLOSURE'); 162a169,172 > case 'ENCLOSURE': > $this->attribs = $attribs; > break; > 196a207,213 > if ($element == 'ENCLOSURE') { > $this->item['enclosure']['url'] = $this- >attribs['URL']; > $this->item['enclosure']['type'] = $this- >attribs['TYPE']; > $this->item['enclosure']['length'] = $this->attribs['LENGTH']; > $this->attribs = ''; > } >
 [2005-05-25 16:41 UTC] mj
Support for the enclosure tag has been added to the version from CVS [1]. If there are >= 1 enclosures in an <item>, the resulting variable will contain an array $item['enclosures'] that in turn contains arrays for each enclosure. I'd be happy if you guys gave it a try. [1] http://cvs.php.net/diff.php/pear/XML_RSS/RSS.php?r1=1.24&r2=1.25&ty=u
 [2005-05-25 16:42 UTC] mj
Concerning the lack of support for lastBuildDate, language and ttl: This should be fixed in CVS as well. I'd be happy if you had a look to verify/falsify this. Thanks!
 [2006-10-06 12:43 UTC] mj (Martin Jansen)
No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. .