title: Extract XML from SOAP envelope in c#
body: <p>I have a response from web service in SOAP envelope as follows:</p>
  
  <pre><code>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
  &lt;s:Body&gt;
    &lt;ProcessTranResponse xmlns="http://www.polaris.co.uk/XRTEService/2009/03/"&gt;
      &lt;ProcessTranResult xmlns:a="http://schemas.datacontract.org/2004/07/XRTEService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"&gt;
        &lt;a:PrintFormFileNameContents i:nil="true"/&gt;
        &lt;a:ResponseXML&gt;response_message&lt;/a:ResponseXML&gt;
      &lt;/ProcessTranResult&gt;
    &lt;/ProcessTranResponse&gt;
  &lt;/s:Body&gt;
  </code></pre>
  
  <p></p>
  
  <p>And I want to get <code>response_message</code> to a string variable. I tried doing</p>
  
  <pre><code>XDocument doc = XDocument.Parse(Response);
  XNamespace xmlnsa = "http://schemas.datacontract.org/2004/07/XRTEService";
  var ResponseXML = doc.Descendants(xmlnsa + "ResponseXML");
  </code></pre>
  
  <p>And when I use watch I see in <code>ResponseXML -&gt; Results View[0] -&gt; Value</code> my <code>response_message</code>, but I can't figure out what is the next step to get to Value from C#.</p>