title: Reformat XML in Visual Studio 2010
body: <p>Is there an easy way to reformat an XML file while viewing it Visual Studio 2010. For example, if you open a generated app.config file, it might look like:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
  &lt;startup&gt;&lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;&lt;/startup&gt;&lt;/configuration&gt;
  </code></pre>
  
  <p>This is difficult to read, is there a way to instruct Visual Studio 2010 to format this, so that it looks more like:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration&gt;
    &lt;startup&gt;
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/&gt;
    &lt;/startup&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>Thanks for any help.</p>
  
  <p><strong>Update:</strong> With credit to Julien Hoarau for one of the answers. The answers are:</p>
  
  <pre><code>Edit -&gt; Advanced -&gt; Format Document (Ctrl+K, Ctrl+D)
  Edit -&gt; Advanced -&gt; Format Selection (Ctrl+K, Ctrl+F)
  </code></pre>