How to Parse the XML to Hash.

xml = File.open('companies.xml')
data = Hash.from_xml(xml)

companies = data['Item']