title: VS 2012 LINQ to XML XmlDocument.Descendants causes "Try specifying type arguments explicitly"
body: <p>I am making a simple LINQ Query against an XmlDocument and I get the "Try specifying type arguments explicitly" error.  Here is my C# code:</p>
  
  <pre><code>var Document = new XmlDocument();
  Document.LoadXml(XmlFilePath);
  var selectedMessage = from msg in Document.Descendants("Messages").Descendants("Message")
                        where msg.Attribute("Code").Value == constant
                        select msg;
  </code></pre>
  
  <p>The xml looks as follows:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;MessageService&gt;
     &lt;Messages&gt;
       &lt;Message Code="DE-01003" Section="Delphi Backend" Line="N/A" Claim="No" Constant="E_PHY_LN_INV_HCPCS" Description="Error reading HCPCS code on line %d (%s)" /&gt;
       &lt;Message Code="DE-01004" Section="Delphi Backend" Line="N/A" Claim="No" Constant="E_PHY_LN_RBRVS_FAMILY_INV_DT" Description="RunFamilyReduction: Invalid Date on claim line %d (%s)" /&gt;
       &lt;Message Code="DE-02002" Section="Delphi Backend" Line="N/A" Claim="No" Constant="E_AMB_LN_INV_HCPCS" Description="Invalid or missing HCPCS code on claim line %d (%s)" /&gt;
       .
       .
       .
     &lt;/Messages&gt;
  &lt;/MessageService&gt;
  </code></pre>
  
  <p>The first call to .Descendants causes the error.  I am not sure what I am doing wrong.   </p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Thanks!</p>
  
  <p>Susan</p>