parameters: (self, text_data)
docstring: Appends a new part to the XML rich text
docstring_summary: Appends a new part to the XML rich text
docstring_tokens: Appends a new part to the XML rich text
function: def rich_text_serialize(self, text_data):
          """Appends a new part to the XML rich text"""
          # accumulate data (+= string is to slow) to udpate element lately
          if self.prev_attributes == self.curr_attributes:
              if self.nodes_list[-1].lastChild != None:
                  self.prev_accumulator.append(text_data)
                  return
  
          # attributes changes, so finally can update prev element
          if (self.prev_accumulator):
              self.nodes_list[-1].lastChild.firstChild.data += "".join(self.prev_accumulator)
              self.prev_accumulator = []
  
          dom_iter = self.dom.createElement("rich_text")
          if self.curr_attributes:
              for tag_property in cons.TAG_PROPERTIES:
                  if tag_property in self.curr_attributes:
                      if self.curr_attributes[tag_property] != "":
                          dom_iter.setAttribute(tag_property, self.curr_attributes[tag_property])
                          
          self.nodes_list[-1].appendChild(dom_iter)
          text_iter = self.dom.createTextNode(text_data)
          dom_iter.appendChild(text_iter)
          self.prev_attributes = self.curr_attributes.copy()
function_tokens: def rich_text_serialize ( self , text_data ) : # accumulate data (+= string is to slow) to udpate element lately if self . prev_attributes == self . curr_attributes : if self . nodes_list [ - 1 ] . lastChild != None : self . prev_accumulator . append ( text_data ) return # attributes changes, so finally can update prev element if ( self . prev_accumulator ) : self . nodes_list [ - 1 ] . lastChild . firstChild . data += "" . join ( self . prev_accumulator ) self . prev_accumulator = [ ] dom_iter = self . dom . createElement ( "rich_text" ) if self . curr_attributes : for tag_property in cons . TAG_PROPERTIES : if tag_property in self . curr_attributes : if self . curr_attributes [ tag_property ] != "" : dom_iter . setAttribute ( tag_property , self . curr_attributes [ tag_property ] ) self . nodes_list [ - 1 ] . appendChild ( dom_iter ) text_iter = self . dom . createTextNode ( text_data ) dom_iter . appendChild ( text_iter ) self . prev_attributes = self . curr_attributes . copy ( )