Hello, Rss i received is truncated, this is just for my DailyMotion RSS. Works fine with other HttpClient, Java, etc.... Zéro <item>, work fine before few days.
Example :
Call :
var xhr = Ti.Network.createHTTPClient(); xhr.open("GET","http://www.dailymotion.com/rss/Joinville-le-Pont/1");
xhr.onload = function()
{
try
{
Ti.API.info(this.responseText);
}
catch(E)
{
alert(E);
}
};
xhr.send();
I need to receive : http://www.dailymotion.com/rss/Joinville-le-Pont/1
And i receive :
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:media="http://search.yahoo.com/mrss" xmlns:dm="http://www.dailymotion.com/dmrss"> <channel> <title>Joinville-le-Pont - Vidéos les plus récentes - Dailymotion</title> <link>http://www.dailymotion.com/user/Joinville-le-Pont/1</link> <description><![CDATA[Bienvenue sur la Web TV de Joinville-le-Pont, l'espace vidéo officiel de la Ville.]]></description> <itunes:subtitle>Dailymotion - Les Vidéos Les Plus Récentes De Joinville-le-Pont</itunes:subtitle> <itunes:summary>Bienvenue sur la Web TV de Joinville-le-Pont, l'espace vidéo officiel de la Ville.</itunes:summary> <itunes:owner> <itunes:name>Dailymotion</itunes:name> <itunes:email>rss@dailymotion.com</itunes:email> </itunes:owner> <itunes:author>Joinville-le-Pont</itunes:author> <itunes:image href="http://www.dailymotion.com/images/dailymotion_itunes.jpg"/> <itunes:explicit>no</itunes:explicit> <itunes:category text="TV & Film" /> <language>en-US</language> <lastBuildDate>Tue, 25 Sep 2012 13:33:03 +0200</lastBuildDate> <image> <url>http://www.dailymotion.com/images/dailymotion.jpg</url> <title>Joinville-le-Pont - Vidéos les plus récentes - Dailymotion</title> <link>http://www.dailymotion.com/user/Joinville-le-Pont/1</link> <width>400</width> <height>144</height> </image> <dm:link rel="uql" href="http://www.dailymotion.com/rss/user/Joinville-le-Pont/1" type="application/rss+xml"/> <dm:link rel="sort_by_visited-week" title="Les +Vues" href="http://www.dailymotion.com/rss/visited-week/user/Joinville-le-Pont/1" type="application/rss+xml"/> <dm:link rel="sort_by_rated-week" title="Les mieux notées" href="http://www.dailymotion.com/rss/rated-week/user/Joinville-le-Pont/1" type="application/rss+xml"/> </channel> </rss>
Thanks for regards.
Yannick
2 Answers
if it worked fine a few days ago then my assumption is that the content changed and you are not parsing the xml properly... ie an exception is being thrown causing the feed to be truncated
are there any errors?
what happens when you run it in the debugger?
Thanks for the answer, the problem is not the parsing but just the xml received is truncated. Look the source of rss feed (link above) ans compare with XML receive (code above). No <item>.....</item>. I precised that the XML is valid, i test with responseText just for see the returns.
Your Answer
Think you can help? Login to answer this question!