From: Robert Klemme Date: 2011-11-24T23:55:02+09:00 Subject: Re: check if a element with a specific value exists in a xml using REXML On Thu, Nov 24, 2011 at 1:49 PM, mythpills p. wrote: > i have attached a sample xml. I am currently using REXML ..basically i > want to check if a element with a specific value exists in XML using our > REXML processor? > for e.g. lets say i want to find if there is a node which holds this > value =>  "content/t1/st_4/page2.swf" and return true (as a node does > exist in the attached xml with the above value) > > Help! http://www.w3schools.com/xpath/ http://www.zvon.org/xxl/XPathTutorial/General/examples.html e.g. //file[text()="content/t1/st_4/page2.swf"] Btw, nokogiri is usually faster than REXML. Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/