PHP 8.6.0 Beta 1 is available for testing

DOMDocument::normalizeDocument

(PHP 5, PHP 7, PHP 8)

DOMDocument::normalizeDocumentNormaliza el documento

Descripción

public function DOMDocument::normalizeDocument(): void

Este método actúa como si guardara y después cargara el documento, poniendo el el documento en una forma "normal".

Parámetros

Esta función no contiene ningún parámetro.

Valores devueltos

No se retorna ningún valor.

Véase también

Found A Problem?

Learn How To Improve This PageSubmit a Pull RequestReport a Bug
+add a note

User Contributed Notes 1 note

up
-1
lingasamy dot sakthivel at gmail dot com
11 years ago
You can use this in this way.
$doc = new DOMDocument('1.0', 'UTF-8');
$doc->loadHTML($content); // html content
$xpath = new DOMXPath($doc);
$doc->normalizeDocument();
Note that, you can use $doc->normalizeDocument(); at any point of time.
+add a note

AltStyle によって変換されたページ (->オリジナル) /