title: Xelement Search
body: <p>Variable resp has following value.
  System.Xml.Linq.XElement resp -           How do I get value of Statuscode in C# ?</p>
  
  <p>Thanks!</p>
  
  <p>**Value of resp is ( Did not include whole xml it's pretty long):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;fiAPI xmlns="http://integration.fiapi.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xsi:schemalocation="http://integration.fiapi.com fiDocumentInquiry.xsd"&gt;
    &lt;fiHeader Version="2.0"&gt;
      &lt;Service Version="1.0" Name="FiservArchiveAccessAPI"&gt;
        &lt;DateTime&gt;2011-08-29T02:27:21-0-4:00&lt;/DateTime&gt;
        &lt;UUID&gt;12345678-1234-1234-1234-123456789012&lt;/UUID&gt;
      &lt;/Service&gt;
      &lt;Security&gt;
        &lt;AuthenticationMaterial&gt;
          &lt;PrincipalPWD&gt;&lt;/PrincipalPWD&gt;
        &lt;/AuthenticationMaterial&gt;
        &lt;PrincipalID&gt;&lt;/PrincipalID&gt;
      &lt;/Security&gt;
      &lt;Client Version="1.3"&gt;
        &lt;VendorID&gt;Vendor Name&lt;/VendorID&gt;
        &lt;AppID&gt;CWS&lt;/AppID&gt;
        &lt;OrgID&gt;44444451&lt;/OrgID&gt;
        &lt;SessionID&gt;88888888-4444-4444-4444-123456789012&lt;/SessionID&gt;
      &lt;/Client&gt;
      &lt;DataSource&gt;
        &lt;URI /&gt;
      &lt;/DataSource&gt;
    &lt;/fiHeader&gt;
    &lt;Response TypeOfResponse="DocumentInquiryRs" TotalRows="2"&gt;
      &lt;Status&gt;
        &lt;StatusCode&gt;0&lt;/StatusCode&gt;
        &lt;Severity /&gt;
      &lt;/Status&gt;
      &lt;RequestEcho TypeOfRequest="DocumentInquiryRq" RequestID="123" Echo="True"&gt;
  </code></pre>