On 26.02.2009 15:15, Naresh Ramaswamy wrote: >> addresses = XPath.match(doc, "//addresses") >> puts addresses.length #0 > > I have tried the above solution but it searches for the element and > producess an array of these nodes. > I would like to just know > if Element 'SEND' exists > do this > elsif Element 'EXPECT' exists > do this > elsif Element 'WAIT' exists > do this > else > p "Error" > end > > I need a solution for the above. Use case. robert