Ruby on Rails problems & solutions - Dec 8, 2010

December 9, 2010

There are no stupid questions

Before you crawl under your rock, remember that someone else will someday will find your stupid question, with the stupid answer, and bless you for it. (That someone else would be ME, today)

And remember, there are no stupid questions.  There are, however, a lot of annoying people who will tell you that your question is stupid.  Rest assured, they, too, have asked stupid questions.  I can practically guarantee it.  

Nokogiri Parsing

I’ve done some XML parsing in the past, but I used XMLSimple.  Now, all the cool kids use Nokogiri, so…

As you can see, you can make Nokogiri respond like XMLSimple… but it’s not recommended. I think I prefer CSS over XPath, but that’s just me.