我正在尝试使用LINQ从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
};
Run Code Online (Sandbox Code Playgroud)
在这种情况下,我如何选择作者 - >名称字段?