def get_platform_id(xml_list):
    """
    Determine the platform ID for the manifest

    :param xml_list: List of parse XML files with version information.

    :return The platform ID
    """

    platform_id = None
    for filename, xml in xml_list.items():
        if "platform_id" not in xml:
            raise KeyError("Failed to generate PFM: XML has no platform id - {0}".format(filename))

        if platform_id:
            if platform_id != xml["platform_id"]:
                raise ValueError("Failed to generate PFM: Version platform ids don't match - ({0}, {1})"
                    .format(platform_id, xml["platform_id"]))
        else:
            platform_id = xml["platform_id"]

    return platform_id