Is there an easy way to convert a Nokogiri XML document to a Hash?
Something like Rails' Hash.from_xml
.
If you want to convert a Nokogiri XML document to a hash, just do the following:
require 'active_support/core_ext/hash/conversions' hash = Hash.from_xml(nokogiri_document.to_s)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With