original_string: public function import_files($xml) {
          $files = array();
          foreach ($xml as $file) {
              $data = new stdClass();
              $data->content = $file['#'];
              $data->encoding = $file['@']['encoding'];
              $data->name = $file['@']['name'];
              $files[] = $data;
          }
          return $files;
      }
code: public function import_files($xml) {
          $files = array();
          foreach ($xml as $file) {
              $data = new stdClass();
              $data->content = $file['#'];
              $data->encoding = $file['@']['encoding'];
              $data->name = $file['@']['name'];
              $files[] = $data;
          }
          return $files;
      }
code_tokens: public function import_files ( $ xml ) { $ files = array ( ) ; foreach ( $ xml as $ file ) { $ data = new stdClass ( ) ; $ data -> content = $ file [ '#' ] ; $ data -> encoding = $ file [ '@' ] [ 'encoding' ] ; $ data -> name = $ file [ '@' ] [ 'name' ] ; $ files [ ] = $ data ; } return $ files ; }
docstring: Import files from a node in the XML.
  @param array $xml an array of <file> nodes from the the parsed XML.
  @return array of things representing files - in the form that save_question expects.
docstring_tokens: Import files from a node in the XML .