var rssFeed = XDocument.Load("http://weblogs.asp.net/scottgu/rss.aspx");
var posts = from item in rssFeed.Descendants("item")
select new
{
Title = (string)item.Element("title"),
Published = (DateTime?)item.Element("pubDate"),
Url = (string)item.Element("link"),
};
var rssFeed = XDocument.Load("http://weblogs.asp.net/scottgu/rss.aspx");
var posts = from item in rssFeed.Descendants("item")
select new
{
Title = (string)item.Element("title"),
Published = (DateTime?)item.Element("pubDate"),
Url = (string)item.Element("link"),
};
发布评论
评论(3)
像这样的事情怎么样:
来源。
What about something like this:
Source.