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

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -