Doesn't load images on Rss Sample tableView from my blog

You must Login before you can answer or comment on any questions.

Hi everyone, I work on an app based on Rss Sample. The feeds loading well from my blog fylada.blogspot.com, but the images of the tableView on the left side doesn’t load at all. The feed url is http://fylada.blogspot.com/feeds/posts/default . I try many solutions which I can think, without result. Does anyone have the solution for this problem? I publish my code about the image loading. I work with Mac Book Pro 10.6.8, Titanium version 2.0.2 , Android Emulator 4.0.3 and iOS emulator 5.0. Thank you!

var image = item.getElementsByTagNameNS('http://fylada.blogspot.com/feeds/posts/default/', 'thumbnail').item(0).getElementsByTagName('img').item(0).getAttribute('src');

1 Answer

You need to check the format of your feed, it is not the same as the format of the sample, so your xml query is returning nothing for your image. Currently you are trying to find the thumbnail tag for each item, then you are trying to find an img tag within that thumbnail tag, but your xml doesn't even have an img tag. You have a thumbnail tag and that tag has a url property which contains the url to the image. Here is what it looks like:

<entry>
<media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-i4gZV7uD_eM/UB6G9iPv1zI/AAAAAAAAAGo/MafiPrwPOs0/s72-c/%25CE%25B1%25CF%2581%25CF%2587%25CE%25B5%25CE%25AF%25CE%25BF%2B%25CE%25BB%25CE%25AE%25CF%2588%25CE%25B7%25CF%2582%2B%25282%2529.jpg' height='72' width='72'/>
</entry>
You need to update your xml query to fit the format of your xml.

Your Answer

Think you can help? Login to answer this question!