<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://labs.echoditto.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>EchoDitto Labs - feedapi - Comments</title>
 <link>http://labs.echoditto.com/taxonomy/term/166</link>
 <description>Comments for &quot;feedapi&quot;</description>
 <language>en</language>
<item>
 <title>That empty array index is</title>
 <link>http://labs.echoditto.com/feedapi-and-bliptv#comment-3943</link>
 <description>&lt;p&gt;That empty array index is actually a namespace URL... for RSS 2.0. Since RSS 2.0 doesn&#039;t have a namespace, and SimplePie does a lot of indexing with namespaces, that&#039;s just how it ended up coming out. :(&lt;/p&gt;
</description>
 <pubDate>Sat, 03 May 2008 12:48:42 -0700</pubDate>
 <dc:creator>Ryan Parman</dc:creator>
 <guid isPermaLink="false">comment 3943 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>Thanks for the thoughtful</title>
 <link>http://labs.echoditto.com/feedapi-and-bliptv#comment-3910</link>
 <description>&lt;p&gt;Thanks for the thoughtful reply, Ryan.  I don&#039;t mean to just bitch about SimplePie, although I&#039;m sure that&#039;s how it came off -- SP really is a great project.  And in fact the sanitization I complained about is not happening in SimplePie: it&#039;s definitely Drupal that&#039;s killing the data somewhere along the way.&lt;/p&gt;
&lt;p&gt;It&#039;s interesting to hear that the custom tag data is already available in the [data] object of... the parser?  I definitely did a print_r on the item objects, and thought I probably would&#039;ve done the same for the parser.  Perhaps I forgot to.  It&#039;s definitely not available in the item object, though, which seems like the logical place for it.&lt;/p&gt;
&lt;p&gt;In any case, I do have to stick by my complaint about the variability of the data structures returned by the custom-tag-grabbing routine, particularly when retrieving an item with nested subelements.  Check out how you access an FLV included by the widely-supported MediaRSS namespace:&lt;/p&gt;
&lt;p&gt;$item[0][&#039;child&#039;][&#039;http://search.yahoo.com/mrss/&#039;][&#039;content&#039;][0][&#039;attribs&#039;][&#039;&#039;][&#039;url&#039;]&lt;/p&gt;
&lt;p&gt;Using an empty string to index an array is pretty awful.  Ick.&lt;/p&gt;
</description>
 <pubDate>Mon, 24 Mar 2008 09:07:31 -0700</pubDate>
 <dc:creator>Tom</dc:creator>
 <guid isPermaLink="false">comment 3910 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>&quot;This is SimplePie&#039;s fault.</title>
 <link>http://labs.echoditto.com/feedapi-and-bliptv#comment-3909</link>
 <description>&lt;p&gt;&lt;cite&gt;&quot;This is SimplePie&#039;s fault. Rather than simply walking the XML structure of the feed and throwing it all into data structures, SimplePie decides it&#039;s smarter than the feed author. If you want an item attribute from a custom RSS namespace, you have to ask for it.&quot;&lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;Or, you could walk the data structure, which is stored in the SimplePie::data property. The API methods are just a simplified way of accessing more commonly used/requested data.&lt;/p&gt;
&lt;p&gt;&lt;cite&gt;&quot;...the data structures returned by SimplePie vary pretty wildly by tag.&quot;&lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;I could be mistaken, but if you&#039;re talking about the data structures that map to the XML, we have a consistent format for noting the XML attributes and child data. In particular, Media RSS is not as clear a spec as I&#039;d hoped, the spec was broken for over a year, and there are numerous sites implementing both correct and broken Media RSS all over the web. We&#039;ve done our best to normalize this data so that our users don&#039;t have to do as much hacking. Some of the things you&#039;re trying to do might be simpler if you used SimplePie&#039;s enclosure-related methods which normalize data between RSS enclosures, Media RSS, and iTunes RSS. &lt;/p&gt;
&lt;p&gt;&lt;cite&gt;&quot;Worse, somewhere along the line ... the data is sanitized and some tags are stripped, making it necessary to urlencode() fields like the video embed tag.&quot;&lt;/cite&gt;&lt;/p&gt;
&lt;p&gt;By default SimplePie does sanitize data and strip out potentially &quot;dangerous&quot; tags and attributes, as per suggestions from Mark Pilgrim on how to consume RSS safely . This sanitization can be turned off pretty simply using a SimplePie config option, and I believe that the guys who do Drupal&#039;s SimpleFeed module do this and use Drupal&#039;s internal sanitizer instead.&lt;/p&gt;
&lt;p&gt;In the end, we have a support forum/list as well as an IRC chat available for asking these very kinds of questions, and complete API documentation in our wiki. We probably could have answered your questions relatively quickly and saved you some headache. :)&lt;/p&gt;
</description>
 <pubDate>Sun, 23 Mar 2008 21:37:09 -0700</pubDate>
 <dc:creator>Ryan Parman</dc:creator>
 <guid isPermaLink="false">comment 3909 at http://labs.echoditto.com</guid>
</item>
</channel>
</rss>
