Is there Swing component that will automatically format XML?

I am looking for Java Swing component, that will automatically format my messy XML (in one line, see example):

<person><name>Joe</name><surname>Black</surname></person>

etc. etc.

Its not very nice to see like billion lines long line :) And I hope there is some component, that'll do the dirty work for me. Thankx

Edit: I get XML input as plain string from database, so there is no real XML doc for me :(

Answers


You don't need to rely on a Swing component to do the formatting. You can try pretty printing your XML and set the formatted output directly in your component. This has been asked before.


Need Your Help

Implementing Event Streams in Haskell using MVars

javascript haskell concurrency

I want to port the following JavaScript code to Haskell: http://jsfiddle.net/mz68R/

recv function gives malformed data Winsock2 C++

tcp recv malformed

In my simple TCP client server application, server send repetitively 1 kB message to the client and client send a reply acknowledgement (just send 'ACK') for each packet. Just think this scenario l...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.