title: Get single value from XML File in C#
body: <p>I am trying to pull a single value from XML stored in a variable in a C# console application.
  Here is my XML:</p>
  
  <pre><code>     string myxml = @"&lt;?xml version='1.0' encoding='utf-8'?&gt;                            
                            &lt;params&gt;
                             &lt;rowsEffected&gt;1&lt;/rowsEffected&gt;
                            &lt;/params&gt;
                            &lt;data&gt;
                              &lt;rowData&gt;
                                &lt;row&gt;
                                  &lt;answer&gt;1234&lt;/answer&gt;
                                &lt;/row&gt;
                              &lt;/rowData&gt;
                           &lt;/data&gt;";
  
  var doc = XDocument.Parse(myxml);  //This is as far as I can get
  </code></pre>
  
  <p>I have read thru many tutorials but can't get this simple task.
  I want to extract the value from the "answer" tag, so my result should be 1234
  The XML will always have one record.
  Any help would be greatly appreciated.</p>