title: C# Linq XML Find Specified element
body: <p>Please could someone post an example of how to check if an element exists in an xml file using linq?</p>
  
  <p>Here is the xml document:</p>
  
  <pre><code>&lt;Database&gt;
   &lt;SMS&gt;
     &lt;Number&gt;"+447528349828"&lt;/Number&gt; 
     &lt;Date&gt;"09/06/24&lt;/Date&gt; 
     &lt;Time&gt;13:35:01"&lt;/Time&gt; 
     &lt;Message&gt;"Stop"&lt;/Message&gt; 
  &lt;/SMS&gt;
   &lt;SMS&gt;
     &lt;Number&gt;"+447528349828"&lt;/Number&gt; 
     &lt;Date&gt;"09/06/24&lt;/Date&gt; 
     &lt;Time&gt;13:35:01"&lt;/Time&gt; 
     &lt;Message&gt;"Stop"&lt;/Message&gt; 
   &lt;/SMS&gt;
  &lt;/Database&gt;
  </code></pre>
  
  <p>I want to be able to specify a number and check if it exists</p>