Archive

Archive for the ‘Ruby’ Category

A five pointer on Hpricot Vs REXML

September 11, 2007 Leave a comment

I’ve been learning to parse XML in Ruby for a while now using Hpricot and REXML. And here’s essentially what you should know if you are going through the same path

  1. Hpricot(as of this writing) is still *very* incomplete! It’s doesn’t support everything that you would want to do in Xpath. I had to jumps through hoops to get a few things done. REXML on the other hand works like a charm. Hpricot also behaves weirdly(and unpredictably) at places.
  2. Hpricot has parts of its implementation in C and way faster than REXML.
  3. I like the Hpricot syntax, which seemed more natural than what REXML uses
  4. REXML is very adament about content errors and would refuse to parse a document having a single misplaced ‘&’. Hpricot never complained.
  5. REXML is in the standard library
Advertisements
Categories: Ruby, Technology

Ruby from a Newbie

July 23, 2007 4 comments

A presentation I gave after learning the language for about a week.
Comments on accuracy and presentation and content are most welcome.

Ruby Talk Slides
Ruby Talk Source

Categories: Ruby, Technology