module ActiveSupport::XmlMini_JDOM

def get_attributes(element)

XML element to extract attributes from.
element::

Returns an empty Hash if node has no attributes.
Converts the attributes array of an XML element into a hash.
def get_attributes(element)
  attribute_hash = {}
  attributes = element.attributes
  (0...attributes.length).each do |i|
    attribute_hash[CONTENT_KEY] ||= ""
    attribute_hash[attributes.item(i).name] = attributes.item(i).value
  end
  attribute_hash
end