Michael Fellinger wrote: > Sure, i've tried for quite some time to get REXML to a point where it > really pretty-prints any document, but apart from implementing a whole > streamlistener that keeps track of indentation and width there doesn't > seem to be any. The new REXML works a bit better but inserts lots of > whitespace at the wrong places. > [] > > REXML::VERSION > # "3.1.6" Don'tunderstand what you mean by "new REXML", since you seem to be using an old one. I'm on 3.1.7.1, and here you do, for example: formatter = REXML::Formatters::Pretty.new( 3 ) formatter.compact = true formatter.write( doc, $stdout) Best regards, Jari Williamsson