title: Select XML elements based on value
body: <p>I have simple XML. I would like to select CASE where Section = "A" by LINQ in VB.NET WindowsForm application. I would appreciate any help. The tips can be in C#. Thank you.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;data&gt;
      &lt;PredefinedText&gt;
          &lt;Section&gt;A&lt;/Section&gt;
          &lt;CASE&gt;Case 1A&lt;/CASE&gt;
      &lt;/PredefinedText&gt;
      &lt;PredefinedText&gt;
          &lt;Section&gt;B&lt;/Section&gt;
          &lt;CASE&gt;Case 1B&lt;/CASE&gt;
      &lt;/PredefinedText&gt;
  &lt;/data&gt;
  </code></pre>
  
  <p>I have this code, but it doesn't return any records to ComboBox...</p>
  
  <pre><code>sSettingsFilePath = "Sections.xml"
  
  Dim xelement As XElement = xelement.Load(sSettingsFilePath)
  
  ComboBox1.DataSource = (From cases In xelement.Elements("PredefinedText") _
                              Select cases.Element("CASE").Value _
                              Where xelement.Element("PredefinedText").Element("Section").Value = "A"
                              Order By Value).ToList()
  </code></pre>