--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Sets the first Text child of this object. See text() for a discussion about Text children.
- !ruby/struct:SM::Flow::P 
  body: 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.
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "text:"
    body: 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.
  - !ruby/struct:SM::Flow::LI 
    label: "Returns:"
    body: this Element.
  type: :NOTE
- !ruby/struct:SM::Flow::VERB 
  body: " doc = Document.new '&lt;a&gt;&lt;b/&gt;&lt;/a&gt;'\n doc.root.text = 'Sean'      #-&gt; '&lt;a&gt;&lt;b/&gt;Sean&lt;/a&gt;'\n doc.root.text = 'Elliott'   #-&gt; '&lt;a&gt;&lt;b/&gt;Elliott&lt;/a&gt;'\n doc.root.add_element 'c'    #-&gt; '&lt;a&gt;&lt;b/&gt;Elliott&lt;c/&gt;&lt;/a&gt;'\n doc.root.text = 'Russell'   #-&gt; '&lt;a&gt;&lt;b/&gt;Russell&lt;c/&gt;&lt;/a&gt;'\n doc.root.text = nil         #-&gt; '&lt;a&gt;&lt;b/&gt;&lt;c/&gt;&lt;/a&gt;'\n"
full_name: REXML::Element#text=
is_singleton: false
name: text=
params: ( text )
visibility: public
