def xml_filter(self, content):
        r"""Filter and preprocess xml content

        :param content: xml content
        :rtype: str
        """
        content = utils.strip_whitespace(content, True) if self.__options['strip'] else content.strip()

        if not self.__options['encoding']:
            encoding = self.guess_xml_encoding(content) or self.__encoding
            self.set_options(encoding=encoding)

        if self.__options['encoding'].lower() != self.__encoding:
            # 编码转换去除xml头
            content = self.strip_xml_header(content.decode(self.__options['encoding'], errors=self.__options['errors']))

        if self.__options['unescape']:
            content = utils.html_entity_decode(content)
        return content