DOMDocument::normalizeDocument

(PHP 5, PHP 7)

DOMDocument::normalizeDocumentNormalizes the document

설명

public void DOMDocument::normalizeDocument ( void )

This method acts as if you saved and then loaded the document, putting the document in a "normal" form.

반환값

값을 반환하지 않습니다.

참고

add a note add a note

User Contributed Notes 1 note

up
-4
lingasamy dot sakthivel at gmail dot com
9 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.
To Top