aspose file tools*
The moose likes XML and Related Technologies and the fly likes XML library that can 'prettify' XML? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML library that can Watch "XML library that can New topic
Author

XML library that can 'prettify' XML?

Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi all,

I'm looking for a Java/XML lib that can take an XML string and turn it into a nicely indented XML string, e.g.





I'll be doing a Google search naturally, but thought I might as well post here since I work here and all that


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Sean Clark
Rancher

Joined: Jul 15, 2009
Posts: 377

Hey,

The java w3c libraries can do that job, I have used them for outputting simple snippets of HTML.
There was a good tutorial on it, one of the first results on google.

Sean

I love this place!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42599
    
  65
The Xerces library has some pretty-fying serializers in the org.apache.xml.serialize package.

http://xerces.apache.org/xerces-j/apiDocs/index.html


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML library that can 'prettify' XML?