From: Wes Gamble Date: 2008-03-14T03:33:05+09:00 Subject: Re: REXML Formatter issue - does each Element need formattin SOLUTION: It turns out that the REXML pretty formatter has a "compact" flag that is undocumented, but does exactly what I want. So this code... require 'rexml/document' require 'rexml/formatters/pretty' .... def write() formatter = REXML::Formatters::Pretty.new formatter.compact = true File.open("#{@file_path}", 'w') do |f| formatter.write(@document, f) end end seems to work well (note the "formatter.compact = true" line). Thanks, Wes -- Posted via http://www.ruby-forum.com/.