Quantcast
Channel: Selecting author name field from Atom feed using LINQ (C#) - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Selecting author name field from Atom feed using LINQ (C#)

$
0
0

I'm trying to select the "name" field from the author node in an ATOM feed using LINQ. I can get all the fields I need like so:

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            };

How would I go about selecting the author -> name field in this scenario?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images