13

I have Notepad++ and XML Tools plugin installed. When I copy an XML file and paste it to the window. It became one line. How can I auo format it and make it readable?

Thanks.

The demo image likes: image

5 Answers 5

9

Plugins -> XML Tools -> Pretty Print (XML only - with line breaks)

1
  • 2
    It seems that version 6.5 doesn't have this plugin :(
    – St.Shadow
    Nov 29, 2013 at 10:31
3

How about Plugins - XML Tools - Pretty Print (XML only - with line breaks)? Default shortcut Ctrl+Alt+Shift+B. This should make your XML very readable.

1

If you don't find the plugin you want to use (eg.: XML Tools), just add it by clicking:

Plugins -> Plugin Manager -> Show Plugin Manager

Find, select and install it. When you re-open Notepad++, it'll be listed under the Plugins menu. After that, do what they've already said: Plugins -> XML Tools -> Pretty Print (XML only - with line breaks)

0

You will need TextFX plugin.

Then go for:

TextFX -> TextFX HTML Tidy -> Tidy: reindent XML

2
  • What NPP version do you have? I had a problem with libtidy.dll.
    – coelhudo
    Jul 27, 2012 at 21:25
  • Newer versions of NPP require external installation of tidy. I've basically stopped using it and adopted XML Tools
    – mlhDev
    Sep 16, 2016 at 14:35
-1

Better option is:

Plugins -> XML Tools -> Linarize XML

1
  • 2
    Does not this function format the XML back to a single line (i.e. contrary to what was asked for)? Nov 7, 2013 at 8:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .