<doc> <item type="1">HelloWorld</item> <item type="2">LINQ</item> <item type="3">C#</item> </doc>
var Results = from docs in result.Descendants("doc") select new Item { a = (from docs2 in docs.Descendants("item") where docs2.Attribute("type").Value == "1" select docs2.Value).First(), b = (from docs2 in docs.Descendants("item") where docs2.Attribute("type").Value == "2" select docs2.Value).First(), c = (from docs2 in docs.Descendants("item") where docs2.Attribute("type").Value == "3" select docs2.Value).First() };
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)