From: nic Date: 2011-01-11T17:30:27+09:00 Subject: Re: REXML Attribute and Quotation Control That is hardcoded in the XMLDecl class. From source: private def content(enc) rv = "version='#@version'" rv << " encoding='#{enc}'" if @writeencoding || enc !~ /utf-8/i rv << " standalone='#@standalone'" if @standalone rv end You could use the similar code that is suggested in the second answer of the SO post to replace the content() method.