I'm working on an application with Windows Phone 7, which displays data from a specific URI, but it won't work. I'm stack,help me please. This is my XML :
<rss version="2.0">
<channel>
<title>info</title>
<link>http://www.info.net</link>
<description>Trouvez toutes les actualités en direct sur info.net ...</description>
<language>fr</language>
<copyright></copyright>
<pubDate></pubDate>
<image>
<url></url>
<title></title>
<link>http://www.info.net</link>
<width>200</width>
<height>200</height>
</image>
<item>
<title>Actualités » Info News » News Régionales : Main info</title>
<link>http://www.info.net/fr/actualite/actualites_info-news_news-regionales/my-main-info/54</link>
<pubDate>Thu, 29 Dec 2011 00:22:00 +0100</pubDate>
<description><![CDATA[<img align='left' width='139' src='http://www.info.net/uploads/content/thumbnails/2011122902313__news.jpg'> My main info details : ...]]></description>
</item><item>
.
.
.
</item></channel></rss>
And i want to display a list that contains:
Main info (title)
http://www.info.net/uploads/content/thumbnails/2011122902313__news.jpg (description)
My main info details (description)
This is my C# code:
var doc = XDocument.Load(new StringReader(e.Result));
var items = from c in doc.Descendants("item")
select new RSSitem()
{
Title = c.Element("title").Value,
Photo = c.Element("img").Attribute("src").Value,
Description = c.Element("description").Value,
Link = c.Element("link").Value,
};
ListBoxNews.ItemsSource = items;