Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tools to format XML in Visual Studio 2010

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?

like image 673
abhi Avatar asked Sep 17 '10 13:09

abhi


People also ask

How do I beautify XML in Visual Studio?

To access XML formatting options, choose Tools > Options > Text Editor > XML, and then choose Formatting.

Does Visual Studio have an XML editor?

The XML editor in Visual Studio is based on the text editor and includes additional support for the XML languages. When you open an XML file in Visual Studio, it opens in the XML editor. The XML editor includes the following features: XML 1.0 syntax checking.

How do I beautify an XML file?

Then there are a couple keyboard shortcuts to beautify the XML: Pretty Print: Ctrl + Shift + Alt + B. Pretty Print (indent attributes): Ctrl + Shift + Alt + A.

Can we format XML in Notepad ++?

Notepad++ has support for validation of XML file content. Validation can be done using Plugin Menu -> XML Tools ->Validate option or you can use short cut CTRL+ALT+Shift+M.


2 Answers

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

Edit -> Advanced -> Format Document

like image 57
Dirk Vollmar Avatar answered Sep 22 '22 20:09

Dirk Vollmar


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

or

Edit -> Format Document

like image 22
Shaun Luttin Avatar answered Sep 24 '22 20:09

Shaun Luttin