Variable resp has following value.
System.Xml.Linq.XElement resp – How do I get value of Statuscode in C# ?
Thanks!
**Value of resp is ( Did not include whole xml it’s pretty long):
<?xml version="1.0" encoding="utf-8" ?>
<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">
<fiHeader Version="2.0">
<Service Version="1.0" Name="FiservArchiveAccessAPI">
<DateTime>2011-08-29T02:27:21-0-4:00</DateTime>
<UUID>12345678-1234-1234-1234-123456789012</UUID>
</Service>
<Security>
<AuthenticationMaterial>
<PrincipalPWD></PrincipalPWD>
</AuthenticationMaterial>
<PrincipalID></PrincipalID>
</Security>
<Client Version="1.3">
<VendorID>Vendor Name</VendorID>
<AppID>CWS</AppID>
<OrgID>44444451</OrgID>
<SessionID>88888888-4444-4444-4444-123456789012</SessionID>
</Client>
<DataSource>
<URI />
</DataSource>
</fiHeader>
<Response TypeOfResponse="DocumentInquiryRs" TotalRows="2">
<Status>
<StatusCode>0</StatusCode>
<Severity />
</Status>
<RequestEcho TypeOfRequest="DocumentInquiryRq" RequestID="123" Echo="True">
You could use the Descendants method. Because your XML has a namespace make sure to include it when querying: