def get_objects(ns, element_name, ext_class)
      elements = getlist(ns, element_name)
      return [] if elements.empty?
      elements.collect do |e|
        ext_class.new(:namespace => ns, :elem => e)
      end
    end
def get_objects(ns, element_name, ext_class)
      elements = getlist(ns, element_name)
      return [] if elements.empty?
      elements.collect do |e|
        ext_class.new(:namespace => ns, :elem => e)
      end
    end
Get all indicated elements as an object of the class you passed as thrid argument.

   entry.get_objects(ns, 'mytag', MyClass).each{ |obj|
     p obj.class #MyClass
   }