Nicks
Nicks

Reputation: 1081

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?

Upvotes: 2

Views: 1136

Answers (8)

Emad Ha
Emad Ha

Reputation: 1222

you can try something online such as https://onlinetool.app/ext/xml_formatter

Upvotes: 0

Sebastian Müller
Sebastian Müller

Reputation: 5589

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.

Upvotes: 1

David Robbins
David Robbins

Reputation: 10046

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

Upvotes: 1

Code Trawler
Code Trawler

Reputation: 323

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.

Upvotes: 3

scronide
scronide

Reputation: 12238

You can reformat XML files in Eclipse using Source > Format

Upvotes: 0

1800 INFORMATION
1800 INFORMATION

Reputation: 135285

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.

Upvotes: 3

John Millikin
John Millikin

Reputation: 200796

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

Upvotes: 0

OregonGhost
OregonGhost

Reputation: 23759

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.

Upvotes: 2

Related Questions