I have the following xml in XmlDocument. I am trying to extract the className from it.
<Registration className="Eng" type="DirectRegistration" state="Activated" xmlns="http://xyz/Registration">
<Fields>
<Field type="abc" value="123456" />
<Field type="xyz" value="789" />
</Fields>
</Registration>
I have tried the following code but its not giving me className.
var xmlNode = xmlDoc.DocumentElement;
Can anyone help me to get the value of className out.
Many Thanks
You were almost there:
xmlDoc.DocumentElementgives you the whole element;GetAttributepulls an individual named attribute from it.