original_string: 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>');
      }
code: 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>');
      }
code_tokens: 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>' ) ; }
docstring: Callback function. Outputs record tag with field subtags and data.
  
  @param xmldb_table $table - XMLDB object of the table from which data was retrieved
  @param object $data - data object (fields and values from record)
  @return void
docstring_tokens: Callback function . Outputs record tag with field subtags and data .