<<(element)
public
Append a child to this element, optionally under a provided namespace. The namespace argument is ignored
if the element argument is an Element object. Otherwise, the element
argument is a string, the namespace (if provided) is the
namespace the element is
created in.
Show source
def << element
if node_type() == :text
at(-1) << element
else
newnode = Node.new( element )
newnode.parent = self
self.push( newnode )
end
at(-1)
end