import re


def _clean_xml(xml_string):
    """Replace invalid characters with "?".

    :type xml_string: str
    :arg xml_string: XML string

    :rtype: str
    :returns: valid XML string
    """
    invalid_chars = re.compile(r'[\000-\010\013\014\016-\037]')
    return invalid_chars.sub('?', xml_string)