title: Exception: The XPath expression evaluated to unexpected type System.Xml.Linq.XAttribute
body: <p>I've an XML file like below:</p>
  
  <pre><code>&lt;Employees&gt;
    &lt;Employee Id="ABC001"&gt;
      &lt;Name&gt;Prasad 1&lt;/Name&gt;
      &lt;Mobile&gt;9986730630&lt;/Mobile&gt;
      &lt;Address Type="Perminant"&gt;
        &lt;City&gt;City1&lt;/City&gt;
        &lt;Country&gt;India&lt;/Country&gt;
      &lt;/Address&gt;
      &lt;Address Type="Temporary"&gt;
        &lt;City&gt;City2&lt;/City&gt;
        &lt;Country&gt;India&lt;/Country&gt;
      &lt;/Address&gt;
    &lt;/Employee&gt;
  </code></pre>
  
  <p>Now I want get all Address Type's.</p>
  
  <p>I tried like below using XPath and I'm getting exception.</p>
  
  <pre><code>var xPathString = @"//Employee/Address/@Type";
  doc.XPathSelectElements(xPathString); // doc is XDocument.Load("xml file Path")
  </code></pre>
  
  <blockquote>
    <p>Exception: The XPath expression evaluated to unexpected type
    System.Xml.Linq.XAttribute.</p>
  </blockquote>
  
  <p>Is there any issue with my XPath?</p>