I'm not sure whether I'm confused.  Shouldn't the output of the
following be '<a att="C">blah</a>'?

  require 'rexml/document'

  xml = '<a att="A">blah</a>'

  doc = REXML::Document.new xml
  doc.elements.each do |a| 
    a.attributes['att'] << 'B'
    a.attributes['att'] = 'C'
  end
  doc.write $stdout               # -> <a att='AB'>blah</a>

Steve