title: Linq-to-XML for retrieving all child nodes
body: <p>I have the following XML</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;ErrorServer&gt;
     &lt;ClientIP&gt;
       &lt;AllowAll&gt;false&lt;/AllowAll&gt;
       &lt;Client_127_0_0_1&gt;true&lt;/Client_127_0_0_1&gt;
     &lt;/ClientIP&gt;
     &lt;Users&gt;
       &lt;Admin&gt;
         &lt;Password&gt;passw0r!d&lt;/Password&gt;
         &lt;NextError&gt;83&lt;/NextError&gt;
         &lt;Active&gt;true&lt;/Active&gt;
       &lt;/Admin&gt;
       &lt;JimBob&gt;
         &lt;Password&gt;passw0r!d&lt;/Password&gt;
         &lt;NextError&gt;83&lt;/NextError&gt;
         &lt;Active&gt;true&lt;/Active&gt;
       &lt;/JimBob&gt;
     &lt;/Users&gt;
   &lt;/ErrorServer&gt;
  </code></pre>
  
  <p>Using linq in c# I am trying to get all user names (Admin &amp; JimBob in the example above) using the following code</p>
  
  <pre><code>    List&lt;string&gt; Result = new List&lt;string&gt;();
  
      XDocument xdoc = XDocument.Load("ErrorServerConfig.xml");
  
      //Run query
      var lv1s = from lv1 in xdoc.Descendants("ErrorServer")
                 select new
                 {
                     Children = lv1.Elements("Users")
                 };
  
      //Loop through results
      foreach (var lv1 in lv1s)
      {
          foreach (var lv2 in lv1.Children)
              Result.Add(lv2.Name.ToString());
      }
  
      return (Result);
  </code></pre>
  
  <p>Which isn't working as it only returns "Users" in the result.  </p>
  
  <p>I am new to linq can anybody tell me the correct way of doing it please?</p>