def set(ns, element_name, value="", attributes=nil)
      xpath = child_xpath(ns, element_name)
      @elem.elements.delete_all(xpath)
      add(ns, element_name, value, attributes)
    end
def set(ns, element_name, value="", attributes=nil)
      xpath = child_xpath(ns, element_name)
      @elem.elements.delete_all(xpath)
      add(ns, element_name, value, attributes)
    end
This method allows you to handle extra-element such as you can't represent
 with elements defined in Atom namespace.

   entry = Atom::Entry.new
   entry.set('http://example/2007/mynamespace', 'foo', 'bar')

 Now your entry includes new element.
 <foo xmlns="http://example/2007/mynamespace">bar</foo>

 You also can add attributes

    entry.set('http://example/2007/mynamespace', 'foo', 'bar', { :myattr => 'attr1', :myattr2 => 'attr2' })

 And you can get following element from entry

   <foo xmlns="http://example/2007/mynamespace" myattr="attr1" myattr2="attr2">bar</foo>

 Or using prefix,

   entry = Atom::Entry.new
   ns = Atom::Namespace.new(:prefix => 'dc', :uri => 'http://purl.org/dc/elements/1.1/')
   entry.set(ns, 'subject', 'buz')

 Then your element contains

   <dc:subject xmlns:dc="http://purl.org/dc/elements/1.1/">buz</dc:subject>

 And in case you need to handle more complex element, pass the REXML::Element object
 which you customized as third argument instead of text-value.

   custom_element = REXML::Element.new
   custom_child = REXML::Element.new('mychild')
   custom_child.add_text = 'child!'
   custom_element.add_element custom_child
   entry.set(ns, 'mynamespace', costom_element)