How do I format XML in Notepad++?

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

    "But can Notepad++ do it?"

    If the XML is invalid, the answer is apparently 'no'. I tried Notepad++ with the Tidy2 and XMLTools plugins. Both give errors similar to "errors encountered, please fix". If you don't care about errors, that's a PITA.

    Instead, open it in visual studio then edit -> advanced -> format document. Quick and pretty.

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

    Try TextFX → TextFX Html Tidy → Tidy: reindent XML

    If you can't try with Eclipse, do right button, source, and correct indent.

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