Tools to format XML in Visual Studio 2010
Asked Answered
C

3

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?

Candis answered 17/9, 2010 at 13:20 Comment(0)
H
20

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

Edit -> Advanced -> Format Document

Henderson answered 17/9, 2010 at 13:24 Comment(0)
L
2

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

or

Edit -> Format Document

Lavern answered 14/8, 2012 at 14:24 Comment(0)
M
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 
Mikaela answered 20/8, 2015 at 1:28 Comment(1)
my 2010 has it in Tools > Options > Text Editor > XML > FormattingHegelianism

© 2022 - 2024 — McMap. All rights reserved.