title: C# Querying an XML Document
body: <p>Good Day,</p>
  
  <p>I am trying to query an XML document and have the following query:</p>
  
  <pre><code>XElement root = XElement.Load(@"..\..\Data.xml");
  var entries = root.Descendants()
                .Where(x =&gt; x.Name.LocalName == "Entry")
                .ToList();
  
  Console.WriteLine("There are {0} nodes...", entries.Count());
  foreach (XElement v in entries)
  {
      Console.WriteLine(v.Value);
  }
  </code></pre>
  
  <p>and this code works because it pulls the correct number of Entry nodes.  The Entry 
  nodes look like:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Database xmlns="http://www.someurl.org/schemas"&gt;
      &lt;InfoFromRecord&gt;
          &lt;BaseData&gt;
              &lt;Entry&gt;
                  &lt;Date&gt;2006-03-08&lt;/Date&gt;XD
                  &lt;Time&gt;09:20:00&lt;/Time&gt;
                  &lt;EnteredBy&gt;DNS&lt;/EnteredBy&gt;
                  &lt;TextEntry&gt;Record 1&lt;/TextEntry&gt;
              &lt;/Entry&gt;
              &lt;Entry&gt;
                  &lt;Date&gt;2006-03-08&lt;/Date&gt;
                  &lt;Time&gt;09:33:00&lt;/Time&gt;
                  &lt;EnteredBy&gt;MW&lt;/EnteredBy&gt;
                  &lt;TextEntry&gt;Record 2&lt;/TextEntry&gt;
              &lt;/Entry&gt;
              &lt;Entry&gt;
                  &lt;Date&gt;2006-03-08&lt;/Date&gt;
                  &lt;Time&gt;08:58:00&lt;/Time&gt;
                  &lt;EnteredBy&gt;BH&lt;/EnteredBy&gt;
                  &lt;TextEntry&gt;Record 3&lt;/TextEntry&gt;
              &lt;/Entry&gt;
          &lt;/BaseData&gt;
      &lt;/InfoFromRecord&gt;
  &lt;/Database&gt;
  </code></pre>
  
  <p>The problem is, I want to extract only the Date and Time, not all four fields.</p>