title: Select XElement where child element has a value
body: <p>Given the following XML:</p>
  
  <pre><code>&lt;platforms&gt;
    &lt;platform&gt;
      &lt;id&gt;1&lt;/id&gt;
      &lt;price&gt;2.99&lt;/price&gt;
    &lt;/platform&gt;
  &lt;/platforms&gt;
  </code></pre>
  
  <p>How can I select the "platform" element as an XElement object based on the child element "id" having a value of "1"?</p>
  
  <p>I have got this far:</p>
  
  <pre><code>XDocument xPlatformXml = new XDocument();
  XElement xel = xPlatformXml.Element("platforms").Elements("platform").Where(x =&gt; x.Value == "1").SingleOrDefault();
  </code></pre>
  
  <p>But this is looking for the value to be in "platform" element rather than "id".</p>