public static function PHPUnit_Util_XML::loadFile

Loads an XML (or HTML) file into a DOMDocument object.

@since Method available since Release 3.3.0

Parameters

string $filename:

boolean $isHtml:

boolean $xinclude:

Return value

DOMDocument

1 call to PHPUnit_Util_XML::loadFile()
PHPUnit_Util_Configuration::__construct in drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/Configuration.php
Loads a PHPUnit configuration file.

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Util/XML.php, line 88

Class

PHPUnit_Util_XML
XML helpers.

Code

public static function loadFile($filename, $isHtml = FALSE, $xinclude = FALSE) {
  $reporting = error_reporting(0);
  $contents = file_get_contents($filename);
  error_reporting($reporting);
  if ($contents === FALSE) {
    throw new PHPUnit_Framework_Exception(sprintf('Could not read "%s".', $filename));
  }
  return self::load($contents, $isHtml, $filename, $xinclude);
}