How to I GET an XML page and parse it into a Ruby hash in Rails? -
assuming xml response @ example.com/query, how parse ruby hash without using external dependencies nokogiri?
also, , not part of question, why use xml?
this trivial:
require 'open-uri' url = 'example.com/query' h = hash.from_xml(open url) this example needs hash#from_xml rail's active_support/core_ext/hash , not work vanilla ruby.
Comments
Post a Comment