parameters: (self, name, text, node=None)
return_statement: return node
docstring: create an element with a text node embedded
  
          DO NOT USE "node" ARGUMENT
  
          FIXME: the "node" argument here is wrong.  It overides the element
          created and renders "name" useless".  This cannot be fixed here.  A
          new method has to replace this one to fix it because too much may
          depend on it.
docstring_summary: create an element with a text node embedded
docstring_tokens: create an element with a text node embedded
function: def create_text_element(self, name, text, node=None):
          '''create an element with a text node embedded
  
          DO NOT USE "node" ARGUMENT
  
          FIXME: the "node" argument here is wrong.  It overides the element
          created and renders "name" useless".  This cannot be fixed here.  A
          new method has to replace this one to fix it because too much may
          depend on it.
          '''
          text_node = self.doc.createTextNode(text)
          if not node:
              node = self.create_element(name)
              node.appendChild(text_node)
          else:
              first = node.firstChild
              if first:
                  node.replaceChild(text_node, first)
              else:
                  node.appendChild(text_node)
          return node
function_tokens: def create_text_element ( self , name , text , node = None ) : text_node = self . doc . createTextNode ( text ) if not node : node = self . create_element ( name ) node . appendChild ( text_node ) else : first = node . firstChild if first : node . replaceChild ( text_node , first ) else : node . appendChild ( text_node ) return node