27

I have a large XML file in one line.

How can I add a line break for each tag so that it is not in one line in my editor?

I am using notepad ++

Thanks in advance

4

3 に答える 3

41

From the menu , go to

Plugins --> XML Tools --> Pretty Print 

If you don't have the XML tools plugin installed, you can download it by clicking on

Plugins --> Show Plugin Manager 

And choosing XML Tools

于 2012-08-02T15:02:23.910 に答える
5

Perhaps that will be useful to someone:

How can I add a line break for each tag so that it is not in one line in my editor?

To do that to several files, automatically, I use XmlLint:

xmllint YOUR_FILE.xml --format

XmlLint is available in the Kubuntu/Ubuntu packages, and also can be downloaded for several operating systems in: ftp://xmlsoft.org/libxml2/

于 2013-08-07T10:54:37.887 に答える
3

instead of of doing this : Plugins --> XML Tools --> Pretty Print , you can use this usefull shortcut : Ctrl + Alt + shift + B

于 2016-10-26T13:43:46.917 に答える