i am using hpricot to parse xml and place it into an object named ‘x’
some_variable = (x.at(“some_element_name”).innerHTML
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
any ideas ?