From: ser@... (Sean Russell) Date: 2003-06-24T10:02:02+09:00 Subject: Re: REXML and double, rather than single quotes Ian Macdonald wrote in message news:<20030622205120.GE3769@caliban.org>... > I have to format output for an application that requires its XML to > have attributes quoted using double, not single quotes. > > Is there any way to coerce REXML into producing double-quotes? Soon, young Jedi. I'm adding some more configurable XML writers to REXML 3.0. FYI, the application is not XML conformant if it doesn't accept single quotes around attributes. In the meantime, if you really need this and are willing to hack the sources, override REXML::Attribute::to_string(). Do something like this in the application that generates the XML: REXML::Attribute.class_eval( %q^ def to_string %Q[#@expanded_name="#{to_s().gsub(/"/, '"')}"] end ^ ) This will rewrite the method that is used to produce the XML fragment for an Attribute. --- SER