original_string: private function load_xmldb_file($file) {
          $xmldb_file = new xmldb_file($file);
  
          if (!$xmldb_file->fileExists()) {
              throw new ddl_exception('ddlxmlfileerror', null, 'File does not exist');
          }
  
          $loaded = $xmldb_file->loadXMLStructure();
          if (!$loaded || !$xmldb_file->isLoaded()) {
              // Show info about the error if we can find it
              if ($structure = $xmldb_file->getStructure()) {
                  if ($errors = $structure->getAllErrors()) {
                      throw new ddl_exception('ddlxmlfileerror', null, 'Errors found in XMLDB file: '. implode (', ', $errors));
                  }
              }
              throw new ddl_exception('ddlxmlfileerror', null, 'not loaded??');
          }
  
          return $xmldb_file;
      }
code: private function load_xmldb_file($file) {
          $xmldb_file = new xmldb_file($file);
  
          if (!$xmldb_file->fileExists()) {
              throw new ddl_exception('ddlxmlfileerror', null, 'File does not exist');
          }
  
          $loaded = $xmldb_file->loadXMLStructure();
          if (!$loaded || !$xmldb_file->isLoaded()) {
              // Show info about the error if we can find it
              if ($structure = $xmldb_file->getStructure()) {
                  if ($errors = $structure->getAllErrors()) {
                      throw new ddl_exception('ddlxmlfileerror', null, 'Errors found in XMLDB file: '. implode (', ', $errors));
                  }
              }
              throw new ddl_exception('ddlxmlfileerror', null, 'not loaded??');
          }
  
          return $xmldb_file;
      }
code_tokens: private function load_xmldb_file ( $ file ) { $ xmldb_file = new xmldb_file ( $ file ) ; if ( ! $ xmldb_file -> fileExists ( ) ) { throw new ddl_exception ( 'ddlxmlfileerror' , null , 'File does not exist' ) ; } $ loaded = $ xmldb_file -> loadXMLStructure ( ) ; if ( ! $ loaded || ! $ xmldb_file -> isLoaded ( ) ) { // Show info about the error if we can find it if ( $ structure = $ xmldb_file -> getStructure ( ) ) { if ( $ errors = $ structure -> getAllErrors ( ) ) { throw new ddl_exception ( 'ddlxmlfileerror' , null , 'Errors found in XMLDB file: ' . implode ( ', ' , $ errors ) ) ; } } throw new ddl_exception ( 'ddlxmlfileerror' , null , 'not loaded??' ) ; } return $ xmldb_file ; }
docstring: Load an install.xml file, checking that it exists, and that the structure is OK.
  @param string $file the full path to the XMLDB file.
  @return xmldb_file the loaded file.
docstring_tokens: Load an install . xml file checking that it exists and that the structure is OK .