public function export_table_data(xmldb_table $table, $data) {
        $this->output('<record>');
        foreach ($data as $key => $value) {
            if (is_null($value)) {
                $this->output('<field name="'.$key.'" value="null" />');
            } else {
                $this->output('<field name="'.$key.'">'.htmlspecialchars($value, ENT_NOQUOTES, 'UTF-8').'</field>');
            }
        }
        $this->output('</record>');
    }