xml-to-hash (rubygems): This gem adds a `to_hash` method to Nokogiri XML nodes into a Ruby hash. In the resulting hash, all keys are constants.  This gem also picks up attributes, processing instructions and doctype declarations. The resulting Hash is wordy, but complete.  As an added bonus, we include line numbers where possible.
Keywords: hash|json|ruby|xml