title: How do I get a list of child elements from XDocument object?
body: <p>I am trying to get all of the "video" elements and their attributes from an XML file that looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;videos&gt;
    &lt;video title="video1" path="videos\video1.wma"/&gt;
    &lt;video title="video2" path="videos\video2.wma"/&gt;
    &lt;video title="video3" path="videos\video3.wma"/&gt;
  &lt;/videos&gt;
  </code></pre>
  
  <p>The following will only select the root node and all of the children. I would like to get all of the 'video' elements into the IEnumerable. Can someone tell me what I'm doing wrong?</p>
  
  <pre><code> IEnumerable&lt;XElement&gt; elements = from xml in _xdoc.Descendants("videos")
                             select xml;
  </code></pre>
  
  <p>The above returns a collection with a length == 1. It contains the root element and all the children. </p>