def on_lxml_dumps(self, lxml, config, dictionary, **kwargs):
<EOL>from ..contrib.xml_parser import XMLParser<EOL>root = kwargs.pop("<STR_LIT:root>")<EOL>if not isinstance(root, str):<EOL><INDENT>root = config.__name__<EOL><DEDENT>return XMLParser.from_dict(dictionary, root=root).to_xml(<EOL>pretty=kwargs.pop("<STR_LIT>", False),<EOL>xml_declaration=kwargs.pop("<STR_LIT>", False),<EOL>encoding=kwargs.pop("<STR_LIT>", "<STR_LIT:utf-8>"),<EOL>)<EOL>
The `lxml <https://pypi.org/project/lxml/>`_ dumps method.

        :param module lxml: The ``lxml`` module
        :param class config: The instance's config class
        :param dict dictionary: The dictionary to serialize
        :param str root: The root tag of the xml document, defaults to the config
            instance's name, optional
        :param bool pretty: Pretty format the resulting xml document, defaults to
            False, optional
        :param bool xml_declaration: Add the xml declaration header to the resulting
            xml document, defaults to False, optional
        :param str encoding: The encoding to use for the resulting xml document,
            defaults to "utf-8", optional
        :returns: The XML serialization
        :rtype: str