I have this code to read XML file
var fileName = "D:\\info1.xml";
XDocument doc = XDocument.Load(fileName);
var col = from dummy in doc.DescendantNodes() select dummy;
foreach (var myvar in col)
{
//Get the code and description here
}
The XML file has this element? how can I get the value of code and desc?
<maritalStatus code="M" desc="Married">