This is my source XML :\[code\] <?xml version="1.0" encoding="UTF-8"?> -<cteProc xmlns="http://www.portalfiscal.inf.br/cte" versao="1.04"> -<CTe>-<infCte versao="1.04" Id="CTe35121004858"> +<ide>-- +<compl> -<emit> <CNPJ>046666660111</CNPJ> <IE>633616308114</IE> <xNome>ALAMO LOGISTICA E TRANSP INTERMODAL LTDA</xNome> <xFant>ALAMO LOGISTICA E TRANSP INTERMODAL LTDA</xFant> -<enderEmit><xLgr>R. ABILIO DOS SANTOS,</xLgr></enderEmit> </emit> <CTe> \[/code\]I have read this file with this code : \[code\] XmlTextReader reader = new XmlTextReader(@"C:\Separados\56000858_v01.04-procCTe.xml"); XmlNodeType type; while (reader.Read()) { type = reader.NodeType; if (type == XmlNodeType.Element) { if (reader.Name == "xMunIni") { reader.Read(); Xmunini = reader.Value; textBox1.Text = Xmunini;} if (reader.Name == "vTPrest") { reader.Read(); vtprest = reader.Value; textBox2.Text = vtprest;} if (reader.Name == "UFIni") { reader.Read(); UFIni = reader.Value; textBox3.Text = UFIni; } if (reader.Name == "nCT") { reader.Read(); NCT = reader.Value; textBox4.Text = NCT;}\[/code\]But, i have read in many post here , the method with LINQ is more efficient, i have try write this :\[code\] var custs45 = from c in XElement.Load(@"C:\Separados\56000858_v01.04-procCTe.xml").Elements("Cte") select new { CFOP = c.Element("CFOP").Value, xMunIni = c.Element("xMunIni").Value };\[/code\]My question is how to assing CFOP and Xmunini to a variable?? i have write this but do not show anything \[code\] string CFF; foreach (var valores in custs45) { CFF = valores.CFOP.ToString() ; }\[/code\]