title: XLINQ : Missing element in xml
body: <p>i have the following xml</p>
  
  <pre><code>&lt;students&gt;
    &lt;student&gt;
      &lt;id&gt;12&lt;/id&gt;
      &lt;name&gt;Mohsan&lt;/name&gt;
    &lt;/student&gt;
    &lt;student&gt;
      &lt;id&gt;2&lt;/id&gt;    
    &lt;/student&gt;
    &lt;student&gt;
      &lt;id&gt;3&lt;/id&gt;
      &lt;name&gt;Azhar&lt;/name&gt;
    &lt;/student&gt;
  &lt;/students&gt;
  </code></pre>
  
  <p>note that in 2 name element is missing. </p>
  
  <p>i have to read this xml using Linq to XML</p>
  
  <p>i used following code to get all students..</p>
  
  <p>please suggest me improvement in this code</p>
  
  <pre><code>var stds = from std in doc.Descendants("student")
                  select new
                  {
                      ID = std.Element("id").Value,
                      Name = (std.Element("name")!=null)?std.Element("name").Value:string.Empty
                  };
  </code></pre>