Ejemplo n.º 1
0
        //from created xml doc
        public static void ReadEmpXMLDocument()
        {
            IEnumerable <string> Emps = from Emp in XDocument.Load(@"C:\Users\User\Desktop\CSharpDemos\Createing and reading xml Dcument\Createing and reading xml Dcument\Data.xml")
                                        .Descendants("employee")
                                        select Emp.Element("Name").Value;

            foreach (string v in Emps)
            {
                Console.WriteLine(v);
            }
        }