title: How to read attribute value from XmlNode in C#?
body: <p>Suppose I have a XmlNode and I want to get the value of an attribute named "Name".
  How can I do that?</p>
  
  <pre><code>XmlTextReader reader = new XmlTextReader(path);
  
  XmlDocument doc = new XmlDocument();
  XmlNode node = doc.ReadNode(reader);
  
  foreach (XmlNode chldNode in node.ChildNodes)
  {
       **//Read the attribute Name**
       if (chldNode.Name == Employee)
       {                    
           if (chldNode.HasChildNodes)
           {
               foreach (XmlNode item in node.ChildNodes)
               { 
  
               }
           }
        }
  }
  </code></pre>
  
  <p>XML Document:</p>
  
  <pre><code>&lt;Root&gt;
      &lt;Employee Name ="TestName"&gt;
      &lt;Childs/&gt;
  &lt;/Root&gt;
  </code></pre>