PHP 8.4.3 Released!

The Dom\HTMLDocument class

(PHP 8 >= 8.4.0)

Einführung

Represents an HTML document.

Klassenbeschreibung

final class Dom\HTMLDocument extends Dom\Document {
/* Geerbte Konstanten */
/* Geerbte Eigenschaften */
public string $URL;
public readonly ?Dom\DocumentType $doctype;
public readonly ?Dom\Element $documentElement;
public readonly ?Dom\Element $lastElementChild;
public readonly int $childElementCount;
public readonly ?Dom\HTMLElement $head;
public string $title;
public readonly int $nodeType;
public readonly string $nodeName;
public readonly string $baseURI;
public readonly bool $isConnected;
public readonly ?Dom\Document $ownerDocument;
public readonly ?Dom\Node $parentNode;
public readonly ?Dom\Element $parentElement;
public readonly Dom\NodeList $childNodes;
public readonly ?Dom\Node $firstChild;
public readonly ?Dom\Node $lastChild;
public readonly ?Dom\Node $previousSibling;
public readonly ?Dom\Node $nextSibling;
/* Methoden */
public static createEmpty(string $encoding = "UTF-8"): Dom\HTMLDocument
public static createFromFile(string $path, int $options = 0, ?string $overrideEncoding = null): Dom\HTMLDocument
public static createFromString(string $source, int $options = 0, ?string $overrideEncoding = null): Dom\HTMLDocument
public saveHtml(?Dom\Node $node = null): string
public saveHtmlFile(string $filename): int|false
public saveXml(?Dom\Node $node = null, int $options = 0): string|false
public saveXmlFile(string $filename, int $options = 0): int|false
/* Geerbte Methoden */
/* Not documented yet */
}

Anmerkungen

Hinweis: Die Erweiterung DOM verwendet die UTF-8-Kodierung, wenn sie mit Methoden oder Eigenschaften arbeitet. Die Parser-Methoden erkennen die Kodierung automatisch oder erlauben es dem Aufrufer, eine Kodierung anzugeben.

Inhaltsverzeichnis

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top