class REXML::Attributes
def [](name)
Related: get_attribute (returns an \Attribute object).
ele.attributes['nosuch'] # => nil
ele.attributes['bar:att'] # => "2"
ele.attributes['att'] # => "<"
ele = d.elements['//ele'] # =>
d = REXML::Document.new(xml_string)
EOT
xml_string = <<-EOT
with entities expanded:
The value returned is the unnormalized attribute value,
if it exists; otherwise +nil+.
Returns the value for the attribute given by +name+,
[name] -> attribute_value or nil
:call-seq:
def [](name) attr = get_attribute(name) return attr.value unless attr.nil? return nil end