Asp.Net Rss Okuma
-
var GazzettaUpdates = (from story in xml.Descendants("item") select new FeedGazzetta { Title = ((string)story.Element("title")), Link = ((string)story.Element("link")), Description = ((string)story.Element("description")), PubDate = ((string)story.Element("pubDate")), Image = ((string)story.Element("media:thumbnail").Attribute("url")) }).ToList();
hocalar şu üstte ki şekilde gelen rss değerini okuyorum örnek: http://feeds.bbci.co.uk/turkce/rss.xml
Ancak Image değerini alamıyorum. İki nokta üst üste olunca değeri okumuyor. Namespace deniliyordu rss de sanırım bunlara. Bilen var mı hangi değer ile okuyabiliriz?
-
hocalar tamam sorunu buldum
XNamespace ns = "http://search.yahoo.com/mrss/"; var GazzettaUpdates = (from story in xml.Descendants("item") select new FeedGazzetta { Title = ((string)story.Element("title")), Link = ((string)story.Element("link")), Description = ((string)story.Element("description")), PubDate = ((string)story.Element("pubDate")), Image = ((string)story.Element(ns+"thumbnail").Attribute("url")) }).ToList();