'Generic RCDATA/RAWTEXT Parsing algorithm
contentType - RCDATA or RAWTEXT'

def parseRCDataRawtext(self, token, contentType):

    assert (contentType in ('RAWTEXT', 'RCDATA'))
    element = self.tree.insertElement(token)
    if (contentType == 'RAWTEXT'):
        self.tokenizer.state = self.tokenizer.rawtextState
    else:
        self.tokenizer.state = self.tokenizer.rcdataState
    self.originalPhase = self.phase
    self.phase = self.phases['text']
