From: Naresh Ramaswamy Date: 2009-02-19T15:24:26+09:00 Subject: Search for an Presence of an XML element in a array hi, I am reading an XML document and storing in a array. Now I need to search for presence of a particular element and array = {elements of XML Document} array[1] = {chile elelments of XML document} *** I want to *** search if element X or Y or Z exists if X exists Do this elsif Y exists Do this else Do This end I am not finding any way to search for elelemtns in XML file. Please provide your solution. My XML file looks like this I am using REXML solution to play with Ruby file. regards, Naresh -- Posted via http://www.ruby-forum.com/.