title: LINQ to XML query not working
body: <p>Have a look on following XML:</p>
  
  <pre><code>&lt;Countries&gt;
     &lt;country name="India"&gt;
        &lt;State name="Maharashtra" capital="Mumbai" PIN="400001"/&gt;
        &lt;State Name="Uttar-Pradesh" capital="Lucknow" PIN="220001"/&gt;
     &lt;/country&gt;
     &lt;country name="Sri-Lanka"&gt;
        &lt;State name="Colombo" capital="Colombo" PIN="123456"/&gt;
        &lt;State name="Candy" capital="Jafana" PIN="654321"/&gt;
     &lt;/country&gt;
   &lt;/Countries&gt;
  </code></pre>
  
  <p>when I use</p>
  
  <pre><code>public IEnumerable&lt;CountryData&gt; GetData()
  {
       var results = from States in StockDoc.Descendants("Countries").Descendants("Country")
                        where (string)states.Attribute("Name") == "India"
  
                        select new CountryData
       {
          _State = (string)States.Element("Country").Element("State").Attribute("Name").Value,
          _Capital = (string)States.Element("Country").Element("State").Attribute("Capital").Value,
          _Pin= (string)States.Element("Country").Element("State").Attribute("PIN").Value
       };
  
        return results.ToList();
    }
  </code></pre>
  
  <p>This generates error on implementing. What is the probleme? Also, please define what above statement means?</p>
  
  <p>I want to display all the countries in a dropdownbox like-</p>
  
  <pre><code>**India**
       Maharashtra
       Uttar-Pradesh
  **Sri-Lanka**
       Colombo
       Candy
  </code></pre>
  
  <p>Also its corresponding values as capital and PIN should display in a label. How can I achieve this?</p>
  
  <p>regards and thanks in advance</p>