parameters: (self, curr_buffer, dom_node, discard_ids=None)
docstring: From the XML rich text to the SourceBuffer
docstring_summary: From the XML rich text to the SourceBuffer
docstring_tokens: From the XML rich text to the SourceBuffer
function: def rich_text_deserialize(self, curr_buffer, dom_node, discard_ids=None):
          """From the XML rich text to the SourceBuffer"""
          if dom_node.firstChild:
              text = dom_node.firstChild.data
              tag_names = []
              for tag_property in cons.TAG_PROPERTIES:
                  if dom_node.hasAttribute(tag_property):
                      property_value = dom_node.attributes[tag_property].value
                      if property_value:
                          if discard_ids is not None and property_value.startswith(cons.LINK_TYPE_NODE):
                              property_value_vec = property_value.split()
                              original_id = int(property_value_vec[1])
                              imported_id = self.dad.node_id_get(original_id, discard_ids)
                              property_value_vec[1] = str(imported_id)
                              property_value = cons.CHAR_SPACE.join(property_value_vec)
                              #print original_id, imported_id
                          tag_names.append(self.dad.apply_tag_exist_or_create(tag_property, property_value))
              tags_num = len(tag_names)
              if tags_num == 0: curr_buffer.insert(curr_buffer.get_end_iter(), text)
              else: curr_buffer.insert_with_tags_by_name(curr_buffer.get_end_iter(), text, *tag_names)
function_tokens: def rich_text_deserialize ( self , curr_buffer , dom_node , discard_ids = None ) : if dom_node . firstChild : text = dom_node . firstChild . data tag_names = [ ] for tag_property in cons . TAG_PROPERTIES : if dom_node . hasAttribute ( tag_property ) : property_value = dom_node . attributes [ tag_property ] . value if property_value : if discard_ids is not None and property_value . startswith ( cons . LINK_TYPE_NODE ) : property_value_vec = property_value . split ( ) original_id = int ( property_value_vec [ 1 ] ) imported_id = self . dad . node_id_get ( original_id , discard_ids ) property_value_vec [ 1 ] = str ( imported_id ) property_value = cons . CHAR_SPACE . join ( property_value_vec ) #print original_id, imported_id tag_names . append ( self . dad . apply_tag_exist_or_create ( tag_property , property_value ) ) tags_num = len ( tag_names ) if tags_num == 0 : curr_buffer . insert ( curr_buffer . get_end_iter ( ) , text ) else : curr_buffer . insert_with_tags_by_name ( curr_buffer . get_end_iter ( ) , text , * tag_names )