我想從使用LINQ的ATOM提要中的作者節點中選擇「姓名」字段。我能得到我需要像這樣的所有字段:使用LINQ(C#)從Atom提要中選擇作者姓名字段
XDocument stories = XDocument.Parse(xmlContent);
XNamespace xmlns = "http://www.w3.org/2005/Atom";
var story = from entry in stories.Descendants(xmlns + "entry")
select new Story
{
Title = entry.Element(xmlns + "title").Value,
Content = entry.Element(xmlns + "content").Value
};
我怎麼會去選擇的作者 - 在這種情況下>名稱字段?
完美,謝謝! – 2008-11-19 10:02:10