title: How can I update/replace an element of an XElement from a string?
body: <p>So here's my case.</p>
  
  <p>I have an XElement, let's call it root, which has descendents, which have descendents, etc.  I pull a descendent using LINQ to XML, load it into a memo editor using <code>.ToString()</code> and edit it.  Now I want to update/replace the original descendent element with the edited version.</p>
  
  <p>Let me mention that this is a simple XML file, with no schema, not using DOM, etc.  I only need to be able to edit and update/replace an element.</p>
  
  <p>Here's a mockup of my XML:</p>
  
  <pre><code>&lt;Root&gt;
    &lt;Genre Name="Rock"&gt;
      &lt;Artist Name="Pink Floyd"&gt;
        &lt;BandMembers&gt;
          &lt;Member&gt;Nick Mason&lt;/Member&gt;
          &lt;Member&gt;Syd Barret&lt;/Member&gt;
          &lt;Member&gt;David Gilmour&lt;/Member&gt;
          &lt;Member&gt;Roger Water&lt;/Member&gt;
          &lt;Member&gt;Richard Wright&lt;/Member&gt;
        &lt;/BandMembers&gt;
        &lt;Category&gt;Favorite band of all time&lt;/Category&gt;
      &lt;/Artist&gt;
      &lt;Artist Name="Led Zepelin"&gt;
        &lt;Category&gt;Love the band&lt;/Category&gt;
      &lt;/Artist&gt;
    &lt;/Genre&gt;
    &lt;Genre Name="Blues"&gt;
      &lt;Artist Name="Muddy Waters"&gt;
        &lt;Instrument&gt;Harmonica&lt;/Instrument&gt;
      &lt;/Artist&gt;
      &lt;Artist Name="Howling Wolf"&gt;
        &lt;Instrument&gt;Guitar&lt;/Instrument&gt;
      &lt;/Artist&gt;
    &lt;/Genre&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>Now say I want to edit "Pink Floyd" element to correct Roger Waters' last name.  I get that element, convert it to a string, load it into my editor, make the changes that I want, and convert it back to an XElement using <code>.Parse()</code>.</p>
  
  <p>Now, how can I update/replace the "Pink Floyd" node in my original XML?</p>