Logo Search packages:      
Sourcecode: wapiti version File versions  Download package

def BeautifulSoup::BeautifulStoneSoup::parse_declaration (   self,
  i 
) [inherited]

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

Definition at line 1255 of file BeautifulSoup.py.

01255                                   :
        """Treat a bogus SGML declaration as raw data. Treat a CDATA
        declaration as a CData object."""
        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

class BeautifulSoup(BeautifulStoneSoup):


Generated by  Doxygen 1.6.0   Back to index