class REXML::Element

def add_attributes hash


e.add_attributes(a)
a = [['foo' => 'bar'], ['baz' => 'bat']]
e = REXML::Element.new

each name must be a string:
each array member must be a 2-element array [name, value];
If argument +array+ is given,

e.add_attributes(h)
h = {'foo' => 'bar', 'baz' => 'bat'}
e = REXML::Element.new

adds each attribute created with the key/value pair:
each key must be a string;
If hash argument +hash+ is given,

returns the argument.
Adds zero or more attributes to the element;

add_attributes(array)
add_attributes(hash) -> hash
:call-seq:
def add_attributes hash
  if hash.kind_of? Hash
    hash.each_pair {|key, value| @attributes[key] = value }
  elsif hash.kind_of? Array
    hash.each { |value| @attributes[ value[0] ] = value[1] }
  end
end