title: Converting XML nodes into attributes using C#
body: <p>I have an XML string that is loaded into an XMLDocument, similar to the one listed below:</p>
  
  <pre><code>  &lt;note&gt;
     &lt;to&gt;You&lt;/to&gt; 
     &lt;from&gt;Me&lt;/from&gt; 
     &lt;heading&gt;TEST&lt;/heading&gt; 
     &lt;body&gt;This is a test.&lt;/body&gt; 
    &lt;/note&gt;
  </code></pre>
  
  <p>I would like to convert the text nodes to attributes (using C#), so it looks like this:</p>
  
  <pre><code>&lt;note to="You" from="Me" heading="TEST" body="This is a test." /&gt;
  </code></pre>
  
  <p>Any info would be greatly appreciated.</p>