I have a xml like this:\[code\]<countries> <country ID="MX"> <idea ID="Valor1">nota1</idea> <idea ID="Valor2">nota2</idea> <idea ID="Valor3">nota3</idea> <idea ID="Valor4">nota4</idea> </country> <country ID="US"> <idea ID="Valor1">nota1</idea> <idea ID="Valor2">nota2</idea> <idea ID="Valor3">nota3</idea> <idea ID="Valor4">nota4</idea> </country></countries>\[/code\]With LINQ to XML how can i get a list of specific type? I tried something like this:I created a class:\[code\]public class Ideas{ public string Country { get; set; } public List<ListItem> ListIdeas { get; set; }}\[/code\]Then I use this class to make a list:\[code\]XDocument xdoc = XDocument.Load(this.Server.MapPath("~/config/ideas.xml"));var cat = from p in xdoc.Descendants("countries") .Elements("country") .Select(m => new Ideas { Country = m.Attribute("ID").Value, ListIdeas = m.Elements("idea") .Select(c => new ListItem { Text = c.Attribute("ID").Value , Value = http://stackoverflow.com/questions/14487410/c.Value }).ToList() });\[/code\]But I get the next error: \[quote\] A query body must end with a select clause or a group clause The type of the expression in the select clause is incorrect. Type inference failed in the call to 'Select'.\[/quote\]