From: Lin Wj Date: 2009-02-20T19:14:25+09:00 Subject: Ignoring Exceptions i am using hpricot to parse xml and place it into an object named 'x' some_variable = (x.at("some_element_name").innerHTML if x.at("some_element_name")) problem is i have a TON of"some_element_name" to assign and i dont want to do a if check for everyone of them is there anyway to do a straight some_variable = x.at("some_element_name").innerHTML and contain them within a begin end and ignore all noMethodExceptions ? i am ok with having some_variable = null *noMethodException is raised when i call a .innerHTML method on an element that doesnt exist. if i do a rescue exception , it catches it and thats the end of it , it stops executing. any ideas ? -- Posted via http://www.ruby-forum.com/.