views:

40

answers:

3

I have notepad++ and I got a xml code which is very long and when I pasted it in notepad++ there is a long line of code. (difficult to read and work.)
Now, I want to know if there is a simple way to make the text readable. (by readable I mean properly tabbed code)
I can do it manually but want a permanent solution to this, as I have faced this several times. I am sure there is a way to do this, as I have done it once before, a couple of years back, may be with Visual Studio or some other editor, I dont remember.
But can notepad++ do it?

(I know, sometimes I dont understand simple things)

Thanks for your time.
-happyhardik

A: 

You can install the plugin called universalindent .
Select it from menu Plugins -> Plugin Manager -> Show Plugin Manager (select UniversalIndentGUI plugin).

Zabba
+1  A: 

Try TextFX --> TextFX Html Tidy --> Tidy: reindent XML

If you can´t try with Eclipse, right button, source, correct indent

Torres
Thanks for the answer but I am not able to find Tidy: reindent XML in my TextFX Html Tidy menu. Can you tell me what I am missing?
happyhardik
A: 

Try Plugins -> XML Tools -> Pretty Print (libXML) or (XML only - with line breaks Ctrl+Alt+Shift+B)

In my experience, libXML gives nice output but only if the file is 100% correctly formatted.

erjiang