def to_xml(self, pretty=False, xml_declaration=False, encoding="<STR_LIT:utf-8>"):
return etree.tostring(<EOL>self.tree,<EOL>pretty_print=pretty,<EOL>xml_declaration=xml_declaration,<EOL>encoding=encoding.upper(),<EOL>).decode(encoding)<EOL>
Get the xml string of the current parser.

        :param bool pretty: Pretty format the resulting xml string
        :param bool xml_declaration: Add xml declaration header to resulting xml content
        :param str encoding: The encoding to use for the resulting xml content
        :return: The xml string of the current parser
        :rtype: str