class Hash

def from_xml(xml, disallowed_types = nil)

type="symbol". Use Hash.from_trusted_xml to parse this XML.
DisallowedType is raise if the XML contains attributes with type="yaml" or

# => {"hash"=>{"foo"=>1, "bar"=>2}}
hash = Hash.from_xml(xml)

XML

2
1


xml = <<-XML

its content
Returns a Hash containing a collection of pairs when the key is the node name and the value is
def from_xml(xml, disallowed_types = nil)
  ActiveSupport::XMLConverter.new(xml, disallowed_types).to_h
end