require 'xtemplate/xml' doc = XTemplate::XMLDocument.new < name1 21 name2 23 name3 22 name4 25 EOF p doc["//name"] p doc["//age"] p doc["/members[2]/**/name"] p doc["//member[age and int(age)>22]/age"]