def flatten_xml_string(xml_string):
    """
    Flatten the xml string so that the output is in one line and without spaces/tabs etc.
    This is because otherwise the request is not valid and gets rejected.
    """
    return ''.join([line.strip() for line in xml_string.split('\n')])