7

Is there an XML formatter available as an add-in for Visual Studio 2010? I am currently using Notepad++ and using the XML Tools plug-in to get the formatting sorted.

Is there an add-in for VS2010, which will do something similar?

MemeDeveloper
  • 6,457
  • 2
  • 42
  • 58
abhi
  • 3,082
  • 6
  • 47
  • 73

3 Answers3

20

Simply press Ctrl+E,D or use the following command from the menu:

Edit -> Advanced -> Format Document

Dirk Vollmar
  • 172,527
  • 53
  • 255
  • 316
2

In my version of VS 2010 it's Ctrl+K,D

or

Edit -> Format Document

Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
1

Personally these days I couldn't survive without

  1. "Align Attributes each on a separate line"

Found in standard VS options :

        Tools > Options > XML > Formatting
  1. The fantastic XAML Regions Extension

Which also works for straight XML, adding the ability to create collapsible regions similar to the following (in c#) :

#region 

public void SomeMethod()
{
//...
}

#endregion 
MemeDeveloper
  • 6,457
  • 2
  • 42
  • 58