How to Auto-Format/Indent Xml/HTML in Notepad++

How To Auto-Format / Indent XML/HTML in Notepad++

Since I upgraded to 6.3.2, I use XML Tools.

  • install XML Tools via the Plugin Admin (Plugins → Plugins Admin... Then search for "XML Tools", check its box and click the "Install" button).
  • use the shortcut Ctrl+Alt+Shift+B (or
    menu → Plugins → XML Tools → Pretty Print)

Sample Image

Sample Image

In older versions:
menu → TextFX → HTML Tidy → Tidy: Reindent XML.

How do I format XML in Notepad++?

Try Plugins -> XML Tools -> Pretty Print (libXML) or (XML only - with line breaks Ctrl + Alt + Shift + B)

You may need to install XML Tools using your plugin manager in order to get this option in your menu.

In my experience, libXML gives nice output but only if the file is 100% correctly formed.

how to use notepad++ for indenting ant file

I have installed the XML Tools plugin for Notepad++.

Then used the "Plugins --> XML Tools --> Pretty print (XML only - with line breaks)" and that solved my formatting problem.



Related Topics



Leave a reply



Submit