8

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

6

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

| improve this answer | |
  • 1
    It seems that version 6.5 doesn't have this plugin :( – St.Shadow Nov 29 '13 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.

| improve this answer | |
0

You will need TextFX plugin.

Then go for:

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

| improve this answer | |
  • It is grayed out. It is not working but thanks. – Love Jul 27 '12 at 21:09
  • What NPP version do you have? I had a problem with libtidy.dll. – coelhudo Jul 27 '12 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 '16 at 14:35
0

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)

| improve this answer | |
-1

Better option is:

Plugins -> XML Tools -> Linarize XML

| improve this answer | |
  • 2
    Does not this function format the XML back to a single line (i.e. contrary to what was asked for)? – pabouk Nov 7 '13 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.