'Convert CORS object into XML string representation.'

def to_xml(self):

    s = (('<' + CORS_CONFIG) + '>')
    for collections in self.cors:
        s += (('<' + CORS) + '>')
        for (collection, elements_or_value) in collections:
            assert (collection is not None)
            s += (('<' + collection) + '>')
            if isinstance(elements_or_value, str):
                s += elements_or_value
            else:
                for (name, value) in elements_or_value:
                    assert (name is not None)
                    assert (value is not None)
                    s += (((((('<' + name) + '>') + value) + '</') + name) + '>')
            s += (('</' + collection) + '>')
        s += (('</' + CORS) + '>')
    s += (('</' + CORS_CONFIG) + '>')
    return s
