Actually, i would use rubyful_soup for this. It is awesome!