@staticmethod
def _addElement(element, key, value):
    """
        Only add attributes to an tag if the key is not None

        :param element: the tag element of the xml tree
        :param key: the key of the attribute
        :param value: the value of the attribute
        :return:
        """
    if value is not None:
        element.set(key, value)
