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

Breadcrumb

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

function HTML5::loadHTMLFragment

Parse a HTML fragment from a string.

Parameters

string $string the HTML5 fragment as a string:

array $options Configuration options when parsing the HTML:

Return value

\DOMDocumentFragment A DOM fragment. The DOM is part of libxml, which is included with almost all distributions of PHP.

File

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

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 loadHTMLFragment($string, array $options = array()) {
    return $this->parseFragment($string, $options);
}

API Navigation

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