'Treat a bogus SGML declaration as raw data. Treat a CDATA
declaration as a CData object.'

def parse_declaration(self, i):

    j = None
    if (self.rawdata[i:(i + 9)] == '<![CDATA['):
        k = self.rawdata.find(']]>', i)
        if (k == (-1)):
            k = len(self.rawdata)
        data = self.rawdata[(i + 9):k]
        j = (k + 3)
        self._toStringSubclass(data, CData)
    else:
        try:
            j = SGMLParser.parse_declaration(self, i)
        except SGMLParseError:
            toHandle = self.rawdata[i:]
            self.handle_data(toHandle)
            j = (i + len(toHandle))
    return j
