I am using C#, framework 3.5. I am reading xml values using xmldocument. I can get the values of attributes but i cannot get the attribute names. Example: My xml looks like
<customer>
<customerlist name = AAA Age = 23 />
<customerlist name = BBB Age = 24 />
</customer>
I could read values using the following code:
foreach(xmlnode node in xmlnodelist)
{
customerName = node.attributes.getnameditem("name").value;
customerAge = node.attributes.getnameditem("Age").value;
}
How to get attribute name (name,Age) instead of their values. Thanks