public static function load_inforef_to_tempids($restoreid, $inforeffile,
            \core\progress\base $progress = null) {

        if (!file_exists($inforeffile)) { // Shouldn't happen ever, but...
            throw new backup_helper_exception('missing_inforef_xml_file', $inforeffile);
        }

        // Set up progress tracking (indeterminate).
        if (!$progress) {
            $progress = new \core\progress\none();
        }
        $progress->start_progress('Loading inforef.xml file');

        // Let's parse, custom processor will do its work, sending info to DB
        $xmlparser = new progressive_parser();
        $xmlparser->set_file($inforeffile);
        $xmlprocessor = new restore_inforef_parser_processor($restoreid);
        $xmlparser->set_processor($xmlprocessor);
        $xmlparser->set_progress($progress);
        $xmlparser->process();

        // Finish progress
        $progress->end_progress();
    }