u"""Assigns a literal.

        If a given node doesn't exist, it will be created.

        :param etree.Element element: element to which we assign.
        :param value: the value to assign

def assign_literal(element, value):
        u"""Assigns a literal.

        If a given node doesn't exist, it will be created.

        :param etree.Element element: element to which we assign.
        :param value: the value to assign
        """
        # Searches for a conversion method specific to the type of value.
        helper = helpers.CAST_DICT.get(type(value), str)

        # Removes all children and attributes.
        element.clear()
        element.text = helper(value)