def text=( text )
      if text.kind_of? String
        text = Text.new( text, whitespace(), nil, raw() )
      elsif !text.nil? and !text.kind_of? Text
        text = Text.new( text.to_s, whitespace(), nil, raw() )
      end
      old_text = get_text
      if text.nil?
        old_text.remove unless old_text.nil?
      else
        if old_text.nil?
          self << text
        else
          old_text.replace_with( text )
        end
      end
      return self
    end
def text=( text )
      if text.kind_of? String
        text = Text.new( text, whitespace(), nil, raw() )
      elsif !text.nil? and !text.kind_of? Text
        text = Text.new( text.to_s, whitespace(), nil, raw() )
      end
      old_text = get_text
      if text.nil?
        old_text.remove unless old_text.nil?
      else
        if old_text.nil?
          self << text
        else
          old_text.replace_with( text )
        end
      end
      return self
    end
Sets the first Text child of this object.  See text() for a
 discussion about Text children.

 If a Text child already exists, the child is replaced by this
 content.  This means that Text content can be deleted by calling
 this method with a nil argument.  In this case, the next Text
 child becomes the first Text child.  In no case is the order of
 any siblings disturbed.
 text::
   If a String, a new Text child is created and added to
   this Element as the first Text child.  If Text, the text is set
   as the first Child element.  If nil, then any existing first Text
   child is removed.
 Returns:: this Element.
  doc = Document.new '<a><b/></a>'
  doc.root.text = 'Sean'      #-> '<a><b/>Sean</a>'
  doc.root.text = 'Elliott'   #-> '<a><b/>Elliott</a>'
  doc.root.add_element 'c'    #-> '<a><b/>Elliott<c/></a>'
  doc.root.text = 'Russell'   #-> '<a><b/>Russell<c/></a>'
  doc.root.text = nil         #-> '<a><b/><c/></a>'