views:

373

answers:

7
+1  Q: 

XML Text Format

Does anyone know of a good program where I can paste in xml (getting it from a System.out in my java class) and it will format the xml so it's not a really long line of text?

+2  A: 

Did you try your favorite browser? You can't really paste it, but you can open any XML file and both IE and Firefox will display a nice, collapsible tree view of the XML hierarchy.

OregonGhost
This is what I'm doing now, but just thought there might be a quicker way rather than saving to a file each time - my laziness coming through! :)
Nicks
Does your IDE provide such a thing? The Visual Studio debugger has some handy XML visualization built-in, so you can see the formatted XML right in the debugger.
OregonGhost
A: 

If you'd like more control over how the formatted text looks, you could try an XML formatter

John Millikin
+1  A: 

If you have it already, try visual studio (otherwise it is perhaps too much to download =)) Visual Studio formats the xml very nice, you can edit it, and you have a collapsible tree view. Just paste it in visual studio then press ctrl+k+d and you get formatted xml code.

Xelluloid
+2  A: 

I like XMLPad. It has a nice formatter plus a bunch of visualisers such as tree view and grid view. There is also a nice interactive XPath query tool and probably many more features.

1800 INFORMATION
Nice one - thanks
Nicks
A: 

You can reformat XML files in Eclipse using Source > Format

scronide
+2  A: 

Visual Studio does this (you can download the express verison for free).

If not, Try Liquid XML - it's free, and it's also got an xpath visualiser which is very handy.

Code Trawler
A: 

Notepad++ if you don't want to use a XML editor.

David Robbins