Topic: XML to Hash

I've parsed an XML-document using Hpricot and would like to convert it to JSON. Form what I understand I have to convert it to a hash first, then convert it to JSON.

Does anyone have any idea how to convert XML to a hash?


Re: XML to Hash

Hash.from_xml  should do the trick.  I read about it here: … h-from-xml

Re: XML to Hash

Also, someone else has used Hpricot to do the 'same' thing here: … ng-hpricot