How do I format XML in Notepad++?

后端 未结 20 2456
不思量自难忘°
不思量自难忘° 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

    For best results, you should use both TextFX XML tidy and XML tools pretty print. Here's how and why:

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

    TextFX has the benefit of wrapping long lines, which XML Tools does not do, but it doesn't indent those new lines correctly.

    2. XML Tools -> Pretty print (Text indent)
    

    XML Tools complements TextFX by indenting the newly wrapped lines nicely.

提交回复
热议问题