Visual Studio is a great IDE even for editing XML. However, whenever I edit XML, it always screw up the tabs. Here's how you fix it:

  1. Tools->Options->Text Editor->XML->Tabs
  2. Select “Keep Tabs”
  3. Verify that “Tab Size”/”Indent Size” are both set to 4