public function write_refs(xml_writer $xmlwriter) {
        $xmlwriter->begin_tag('inforef');
        foreach ($this->refs as $item => $ids) {
            $xmlwriter->begin_tag($item.'ref');
            foreach (array_keys($ids) as $id) {
                $xmlwriter->full_tag($item, $id);
            }
            $xmlwriter->end_tag($item.'ref');
        }
        $xmlwriter->end_tag('inforef');
    }