Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. HTML5.php

function HTML5::loadHTMLFile

Convenience function to load an HTML file.

This is here to provide backwards compatibility with the PHP DOM implementation. It simply calls load().

Parameters

string $file The path to the file to parse. If this is a resource, it is: assumed to be an open stream whose pointer is set to the first byte of input.

array $options Configuration options when parsing the HTML.:

Return value

\DOMDocument A DOM document. These object type is defined by the libxml library, and should have been included with your version of PHP.

File

vendor/masterminds/html5/src/HTML5.php, line 106

Class

HTML5
This class offers convenience methods for parsing and serializing HTML5. It is roughly designed to mirror the \DOMDocument native class.

Namespace

Masterminds

Code

public function loadHTMLFile($file, array $options = array()) {
    return $this->load($file, $options);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal