My favorite way to quickly format a given chunk of XML is to useNotepad++and the XML Tools plugin. You can get Notepad++here. And the XML Tools plugin ishere(you’ll have to wait a few seconds before the download starts).@H_403_1@
Installing Notepad
(the following instructions are based on Notepad++ v5.9.4 and my differ in later versions)@H_403_1@
1) Choose your language:@H_403_1@
@H_403_1@
@H_403_1@
2) Click Next:@H_403_1@
3) Agree to the License Agreement:@H_403_1@
4) Choose where you want to install the files:@H_403_1@
5) Choose what options you want to install (I simply use the defaults):@H_403_1@
6) Choose the final set of options. I check the first one because I like having applications keep their data in their own installation directory:@H_403_1@
8) Click Finish and you’re done!@H_403_1@
Settings In Notepad++
There are a few settings that I always set that (I find) make life more convenient (but that’s just me).@H_403_1@
Under Settings | Preferences:@H_403_1@
On the “General” tab,I check “Show close button on each tab”.@H_403_1@
On the “MISC.” tab,I uncheck “Remember current session for next launch” because I always want Notepad++ to open with a new blank document.@H_403_1@
Installing the XML Tools
If you run Notepad++ and look in the Plugins menu,you’ll see that the XML Tools aren’t there:@H_403_1@
1) Download the XML tools fromhere.@H_403_1@
2) Unzip the file and copy the XMLTools.dll to the Notepad++ plugins folder (in the example above: C:\Program Files (x86)\Notepad++\plugins):@H_403_1@
3) Re-start Notepad++ and you should now see the XMLTools appear in the Plugins menu: When you click on “How to use…” you’ll get the following: 4) I’ve just tried (2011/10/20) following those links and the first one doesn’t work and the 2nd one just takes you to a directory listing. So,I’ve uploaded the zip file to my site and you candownload the missing lib files from here.@H_403_1@
5) Unzip the ext_libs.zip file and then copy the unzipped DLLs to the Notepad++ installation directory (in the example above: C:\Program Files (x86)\Notepad++):@H_403_1@
6) Re-start Notepad++ and you should finally see the proper XML Tools menu:@H_403_1@
The feature I use the most is “Pretty print (XML only – with line breaks)”. This will format any piece of XML with all the proper line spacing.@H_403_1@
Start with:@H_403_1@