title: No implicit conversion between XNode and XElement
body: <p>I have two variables XResult, Xtemp of type XElement.</p>
  
  <p>I am trying to extract all the <code>&lt;vehicle&gt;</code> elements from Xtemp and add them to Xresult under <code>&lt;vehicles&gt;</code>.</p>
  
  <p>It seems that in Xtemp sometimes <code>&lt;vehicle&gt;</code> will appear under <code>&lt;vehicles&gt;</code>, and sometimes it will be by itself.</p>
  
  <pre><code>XResult.Descendants(xmlns + "Vehicles").FirstOrDefault().Add(
     XTemp.Descendants(xmlns + "Vehicles").Nodes().Count() > 0 
     ? XTemp.Descendants(xmlns + "Vehicles").Nodes() 
     : (XTemp.Descendants(xmlns + "SearchDataset").FirstOrDefault().Descendants(xmlns + "Vehicle")));</code></pre>
  
  <p>In the code above I am using the ternary operator to check if <code>&lt;vehicles&gt;</code> has childs then get all of them else go get all  <code>&lt;vehicle&gt;</code> elements.</p>
  
  <p>This produces the error: no implict conversion between <code>System.Collections.Generic.IEnumerable&lt;System.Xml.Linq.XNode&gt;</code> and <code>System.Collections.Generic.IEnumerable &lt;System.Xml.Linq.XElement&gt;</code></p>
  
  <p>Can some body help me correct this.
  Thanks in advance.
  BB.</p>