title: Visual Studio XML formatting messed up
body: <p>I have this problem present in various visual studio version I used over the past 3 years (2010,2013,2015) and I just can't solve it. My XML document formation messes up. The thing is that some XMLs are formatted just fine and some are not.</p>
  
  <p>For example I want to have it like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;MGL_Object&gt;
    &lt;rendering:MGL_IBLight
      name="ibl_tex_sunset_bg"
      texture_prefix="tex_sunset"
      rotation="-180"
      intensity="1"
      reflection_compression="1"
      dynamic_range_normalization="4000"
      gtr1="0"
    /&gt;
    &lt;rendering:MGL_LightSetting
      name="light_settings_bg"
      use_ao="1"
      image_based_light="ibl_tex_sunset_bg"
    /&gt;
  &lt;/MGL_Object&gt;
  </code></pre>
  
  <p>But if I format document (Ctrl+K,Ctrl+D) I get this</p>
  
  
  
  <pre><code>&lt;MGL_Object&gt;
  &lt;rendering:MGL_IBLight
  name="ibl_tex_sunset_bg"texture_prefix="tex_sunset"rotation="-180"intensity="1"reflection_compression="1"dynamic_range_normalization="4000"gtr1="0"/&gt;&lt;rendering:MGL_LightSetting
  name="light_settings_bg"use_ao="1"image_based_light="ibl_tex_sunset_bg"/&gt;&lt;/MGL_Object&gt;
  </code></pre>
  
  <p>I just don't get it why. </p>
  
  <p>Here are screen shots from before and after. </p>
  
  <p><a href="https://i.stack.imgur.com/8ofp5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8ofp5.png" alt="enter image description here"></a></p>
  
  <p>after</p>
  
  <p><a href="https://i.stack.imgur.com/ffeEt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ffeEt.png" alt="enter image description here"></a></p>
  
  <p>And also WHY some of the parts are underlined? I don't use any schema to validate XML!</p>
  
  <p>Also while editing such underlined XML I have troubles as it is not well formatted on the fly and auto completion totally messes thing up.</p>