title: Format XElement object
body: <p>How can I format the contents of an XElement object? </p>
  
  <p>I know that the output string is automatically formatted when calling .ToString(), but I want to add the whitespace nodes before converting the objects to string.</p>
  
  <p>The intention is to format XML nodes in the model that is generated by the Microsoft.VisualStudio.XmlEditor classes.</p>