using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Text;
using System.Xml.Linq;
publicclass MainClass
{
publicstaticvoid Main()
{
XElement root = null;
root = XElement.Load(@"\employees.xml");
var result = from item in root.Elements("employee")
where item.Attributes("employeeid").Count() > 0
select item.Attribute("employeeid").Value;
foreach (var obj in result)
{
Console.WriteLine(obj);
}
}
}