title: How to save XML element values to variables
body: <p>Part of my MVC app is a controller action method that POSTs data to a web service and receives an XML response.  I have figured out how to get the response into an XDocument but now I need to go through the info and get some of the node values.  I have been researching, and the closest option I can find it to use XPath.</p>
  
  <p>I am wondering if this is the best way to go, or if you suggest another way.  The XML I am working with will look something like:</p>
  
  <pre><code>&lt;HistoryResponse&gt;
    &lt;ResponseType&gt;resultsList&lt;/ResponseType&gt;
    &lt;Matches&gt;0&lt;/Matches&gt;
    &lt;SessionID&gt;75803234r23df3de&lt;/SessionID&gt;
    &lt;RecStart&gt;0&lt;/RecStart&gt;
    &lt;ClientCode&gt;&lt;/ClientCode&gt;
    &lt;Results&gt;&lt;/Results&gt;
  &lt;/HistoryResponse&gt;
  </code></pre>
  
  <p>I need to go through, grab the Matches and SessionID and put the values into variables.</p>
  
  <p>Thanks.</p>