I'm parsing through some data I'm scraping from the web using Mechanize and Nokogiri. Nokogiri is doing a good job along with xpath to get the data that I want.
But here is my problem:
Once I have the data back, The result is in the class type ' Nokogiri::XML::NodeSet ' and this is rather challenging for me to iterate through for the nested xml data in order to get what I want.
I NEED TO Convert this to a hash, and make it more friendly to iterate through. I've looked at the following libraries
And neither of them have just worked.
Now I'm looking at 'RubyXL::Hash'.
In the meantime, any ideas and inside experience with this problem would be appreciated.
why hasn't Nokogiri hasn't built in a .to_hash method into it's library?