How do I format XML in Notepad++?

后端 未结 20 2490
不思量自难忘°
不思量自难忘° 2020-11-27 08:40

I have Notepad++ and I got some XML code which is very long. When I pasted it in Notepad++ there was a long line of code (difficult to read and work with).

I want to

相关标签:
20条回答
  • 2020-11-27 09:24

    If you get this error:

    Cannot load 32-bit plugin, XMLTools.dll is not compatible with the current version of Notepad++

    Here you can find a working version for Windows 10 x64: Xml Tools 2.4.9.2 Unicode

    Note: It's the only version I've found working on Windows 10 Professional x64.

    0 讨论(0)
  • 2020-11-27 09:27

    Notepad++ v6.6.3 with plugin "XML Tools" and shortcut Ctrl + Alt + Shift + B works fine.

    0 讨论(0)
  • 2020-11-27 09:28

    The latest version of Notepad++ x64 v7.6.2 on Windows 10 already moved the plugin manager to 'Plugins Admin'.

    Old versions of Notepad++ and plugin manager won't work.

    0 讨论(0)
  • 2020-11-27 09:29

    You can find details here To Quickly Format XML using Pretty Print (libXML)

    Installing the XML Tools

    If you run Notepad++ and look in the Plugins menu, you’ll see that the XML Tools aren’t there:

    1. Download the XML tools from here.

    2. Unzip the file and copy the XMLTools.dll to the Notepad++ plugins folder (in the example above: C:\Program Files (x86)\Notepad++\plugins):

    3. Re-start Notepad++ and you should now see the XMLTools appear in the Plugins menu.

    4. 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++).

    5. Re-start Notepad++ and you should finally see the proper XML Tools menu.

    6. 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.

    0 讨论(0)
  • 2020-11-27 09:31

    Here are most of plugins you can use in Notepad++ to format your XML code.

    • UniversalIndentGUI
      (I recommend this one)

    Enable 'text auto update' in plugin manager-> UniversalIndentGUI
    Shortkey = CTRL+ALT+SHIFT+J

    • TextFX
      (this is the tool that most of the users use)

    Shortkey = CTRL+ALT+SHIFT+B

    • XML Tools
      (customized plugin for XML)

    Shortkey = CTRL+ALT+SHIFT+B

    0 讨论(0)
  • 2020-11-27 09:36
    Step 1: Install XML Tools plugin
    Step 2: Format ....completed
    

    0 讨论(0)
提交回复
热议问题