XDocument doc = XDocument.Load("C:\\Account.xml");
var result = from ds in doc.Descendants("Account")
where ds.Element("IDNumber").Value == account.ToString()
select new
{
Balance = ds.Element("AvailableBalance").Value,
AccountID = ds.Element("IDNumber").Value
};
return result.ToArray();
My accounts XML will be
2554 50045 2555 4645