def get_object(ns, element_name, ext_class)
      elements = getlist(ns, element_name)
      return nil if elements.empty?
      ext_class.new(:namespace => ns, :elem => elements.first)
    end
def get_object(ns, element_name, ext_class)
      elements = getlist(ns, element_name)
      return nil if elements.empty?
      ext_class.new(:namespace => ns, :elem => elements.first)
    end
Get indicated elements as an object of the class you passed as thrid argument.

   ns = Atom::Namespace.new(:uri => 'http://example.com/ns#')
   obj = entry.get_object(ns, 'mytag', MyClass)
   puts obj.class #MyClass

 MyClass should inherit Atom::Element