The Dom\HTMLDocument class
(PHP 8 >= 8.4.0)
Introduction
Represents an HTML document.
Class synopsis
/* Inherited constants */
/* Inherited properties */
/* Methods */
public static createFromFile(string
$path, int $options = 0, ?string $overrideEncoding = null): Dom\HTMLDocumentpublic static createFromString(string
$source, int $options = 0, ?string $overrideEncoding = null): Dom\HTMLDocument/* Inherited methods */
/* Not documented yet */
}Notes
Note: The DOM extension uses UTF-8 encoding when working with methods or properties. The parser methods auto-detect the encoding or allow the caller to specify an encoding.
Table of Contents
- Dom\HTMLDocument::createEmpty — Creates an empty HTML document
- Dom\HTMLDocument::createFromFile — Parses an HTML document from a file
- Dom\HTMLDocument::createFromString — Parses an HTML document from a string
- Dom\HTMLDocument::saveHtml — Serializes the document as an HTML string
- Dom\HTMLDocument::saveHtmlFile — Serializes the document as an HTML file
- Dom\HTMLDocument::saveXml — Serializes the document as an XML string
- Dom\HTMLDocument::saveXmlFile — Serializes the document as an XML file
↑ and ↓ to navigate • Enter to select • Esc to close • / to open