Skip to content

PrzemekDeren/DOMDocumentExtended

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

DOMDocumentExtended

Extension of DOMDocument class.

innerHTML() method exapmle usage.

<?php

require_once './DOMDocumentExtended.php';

use DOMDocumentExtended;

$html = "<p><strong>Exapmle</strong></p><p>HTML</p>";

$dom = new DOMDocumentExtended;
$dom->loadHTML($html);

$node = $dom->getElementsByTagName('body')[0];
$innerHTML = $dom->innerHTML($node);

echo '<pre>'.htmlentities($innerHTML).'</pre>';

Releases

No releases published

Packages

No packages published

Languages