here is simple solution create class BasicSetup
class BasicSetup
{
public string HeadId { get; set; }
public string Amount { get; set; }
}
and here is code to read xml object
string path = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) + "\\XMLData.xml";
XDocument objXML = XDocument.Load(path);
List<BasicSetup> objPARAMS = (from b in objXML.Descendants("BasicSetup")
select new BasicSetup()
{
HeadId = b.Attribute("HeadId").Value,
Amount = b.Attribute("Amount").Value
}).ToList<BasicSetup>();
foreach(BasicSetup obj in objPARAMS )
{
Console.WriteLine(String.Format("HeadId : {0} and Amount : {1}.", obj.HeadId,obj.Amount));
}