title: Replace OuterXml OR generate intended string from InnerXml
body: <p>I have a UI that uses the DataGridView to display the content of XML files. </p>
  
  <p>If XmlNode contains only InnerText, it's quite simple, however I'm having a problem with nodes that contains childnodes (and not only string). </p>
  
  <p><strong>Simple</strong></p>
  
  <pre><code>&lt;node&gt;value&lt;/node&gt;
  </code></pre>
  
  <p>Displayed as "value" in DataGridViewCell. </p>
  
  <p><strong>Complex</strong></p>
  
  <pre><code>&lt;node&gt;
      &lt;foo&gt;bar&lt;/foo&gt;
      &lt;foo2&gt;bar&lt;/foo2&gt;
  &lt;/node&gt; 
  </code></pre>
  
  <p>The problem is that the InnerXml code is not intended and it's very hard to modify in UI. </p>
  
  <p>I've tried to use XmlTextWriter to "beautify" the string - it works quite well, however requires a XmlNode (includes node, not only childnodes) and I cannot assign it back to InnerXml. </p>
  
  <p>I would like to either see following in the UI: </p>
  
  <pre><code>&lt;foo&gt;bar&lt;/foo&gt;
  &lt;foo2&gt;bar&lt;/foo2&gt;
  </code></pre>
  
  <p>(this can be assigned to InnerXml afterwards) </p>
  
  <p>Or </p>
  
  <pre><code>&lt;node&gt;
      &lt;foo&gt;bar&lt;/foo&gt;
      &lt;foo2&gt;bar&lt;/foo2&gt;
  &lt;/node&gt; 
  </code></pre>
  
  <p>(and find a way how to replace OuterXml with this string). </p>
  
  <p>Thanks for any ideas, 
  Martin</p>