I'm making a HTTP request to a public IMDb-style TV episode service. I'm returned data like
<title>The X-Files</title>
<episodes>202</episodes>
<ended>Yes</ended>
And I want to work with that data in my program. Ultimately, I want to use it to form an SQL
statement and insert the data into my database.
However, actually turning the data into a hash is harder than I expected. I googled it, and there are a lot of gems that purport to help, like Simple-XML
-- but they expect files, and don't seem to behave when I pass them an object containing XML instead.
What's the common and accepted way to do this?