From: Charles Wel Date: 2010-08-01T23:41:00+09:00 Subject: REXML - controlling whitespaces and inserting CR Hello All, I have an XML file containing this Description de Description en Description de Description en I made a code to add a new tag to each . The part of code is: require "rexml/document" include REXML ... ... pval = Element.new("value") pval.add_attribute("xml:lang","fr") pval.add_text("Description fr") fproperty.elements << pval fproperty is the node object My final XML file looks like this: Description de Description en Description fr Description de Description en Description fr One "TAB" is inserted for each 4 spaces which were in the original file. How to avoid this? And how to add a CR to the new element? Thanks for your help, I'm a very newby -- Posted via http://www.ruby-forum.com/.