def setupParserForBuffer(self, buffer, filename):
        """Setup the parser context to parse a new buffer; Clears any
          prior contents from the parser context. The buffer
          parameter must not be None, but the filename parameter can
           be """
        libxml2mod.xmlSetupParserForBuffer(self._o, buffer, filename)