title: XmlReader - I need to edit an element and produce a new one
body: <p>I am overriding a method which has an XmlReader being passed in, I need to find a specific element, add an attribute and then either create a new XmlReader or just replace the existing one with the modified content. I am using C#4.0</p>
  
  <p>I have investigated using XElement (Linq) but I can't seem to manipulate an existing element and add an attribute and value.</p>
  
  <p>I know that the XmlWriter has WriteAttributeString which would be fantastic but again I am not sure how it all fits together</p>
  
  <p>I would like to be able to do something like --- This is pseudo-code!</p>
  
  <pre><code>public XmlReader DoSomethingWonderful(XmlReader reader)
  {
     Element element = reader.GetElement("Test");
     element.SetAttribute("TestAttribute","This is a test");
     reader.UpdateElement(element);
     return reader;
  }
  </code></pre>