def download_stationxml(client, client_name, bulk, filename, logger):
    """
    Download all channels for a station in the already prepared bulk list.

    :param client: An active client instance.
    :param client_name: The name of the client mainly used for logging
        purposes.
    :param bulk: An already prepared bulk download list for all channels and
        time intervals for the given station. All items in there are assumed
        to come from the same station.
    :param filename: The filename to download to.
    :param logger: The logger instance to use for logging.

    :returns: A tuple with the network and station id and the filename upon
        success
    """
    network = bulk[0][0]
    station = bulk[0][1]
    try:
        client.get_stations_bulk(bulk=bulk, level="response",
                                 filename=filename)
    except Exception:
        logger.info("Failed to download StationXML from '%s' for station "
                    "'%s.%s'." % (client_name, network, station))
        return None
    logger.info("Client '%s' - Successfully downloaded '%s'." %
                (client_name, filename))
    return ((network, station), filename)