我想清除我的RSS源中的HTML編碼。我無法解決如何設置下面的HTML編碼。從字符串中刪除HTML
var rssFeed = XElement.Parse(e.Result);
var currentFeed = this.DataContext as app.ViewModels.FeedViewModel;
var items = from item in rssFeed.Descendants("item")
select new ATP_Tennis_App.ViewModels.FeedItemViewModel()
{
Title = item.Element("title").Value,
DatePublished = DateTime.Parse(item.Element("pubDate").Value),
Url = item.Element("link").Value,
Description = item.Element("description").Value
};
foreach (var item in items)
currentFeed.Items.Add(item);
您是否嘗試過使用'HtmlAgilityPack'庫?請查看http://htmlagilitypack.codeplex.com/discussions/225113 – Jack 2012-04-01 20:06:55
OuterText或OuterHtml有你需要的嗎? – 2012-04-01 21:11:35