title: How to Get Element Names from XElement Using C#?
body: <p>I have a Xml and i have to get the element name</p>
  
  <pre><code> &lt;Data&gt;
       &lt;Test key="G" modifier="control" /&gt; 
       &lt;Test1  key="E" modifier="control" /&gt; 
       &lt;Test3 /&gt; 
       &lt;Test4 /&gt; 
   &lt;/Data&gt;
  
   XDocument xd = XDocument.Load("..\\Cmd.xml");
   IEnumerable&lt;XElement&gt; xeCmdData = Cmd.XPathSelectElements(".//Data");
  
   foreach (XElement xeData in xeCmdData)
   {
       // here i am getting the whole xml how to get Element name  ... 
       // Like &lt;Data&gt; 
       //          &lt;Test key="G" modifier="control" /&gt; 
       //          &lt;Test1  key="E" modifier="control" /&gt; 
       //          &lt;Test3 /&gt; 
       //          &lt;Test4 /&gt;  
       //      &lt;/Data&gt;
   }               
  </code></pre>
  
  <p>How to get Element names ? </p>