Ezra Zygmuntowicz
3/20/2008 2:27:00 AM
On Mar 19, 2008, at 7:19 PM, a marc aurele wrote:
> basicaly i receive a xml response from the internet
> and i would like to convert the xml structure into
> an HASH object . Theres probably a lot of ways
> to get this done but im curious to see if theres a gem
> or RUBY way of doing this directly .. thanks all. =]
$ sudo gem install xml-simple
require 'rubygems'
require 'xmlsimple'
file = "/some/file.xml"
xml = XmlSimple.xml_in File.open(file).read, {'KeepRoot' => true}
Cheers-
- Ezra Zygmuntowicz
-- Founder & Software Architect
-- ezra@engineyard.com
-- EngineYard.com