A modern, accurate HTML parser and serializer for PHP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
J. King 28f0bbfe72 Suppress only one scripting test 4 years ago
lib Better coverage of BOM-based detection 4 years ago
tests Suppress only one scripting test 4 years ago
vendor-bin Start on character encoding detection 5 years ago
.gitignore Character reference fixes 5 years ago
AUTHORS Added authors file and updated license 6 years ago
LICENSE Added authors file and updated license 6 years ago
README.md Organization 6 years ago
RoboFile.php New from-scratch character reference consumer 5 years ago
composer.json Basic skeleton of test suite 5 years ago
composer.lock Start on character encoding detection 5 years ago
robo Basic skeleton of test suite 5 years ago
robo.bat Basic skeleton of test suite 5 years ago

README.md

HTML5

Tools for parsing and printing HTML5 documents and fragments.

<?php
$dom = dW\HTML5\Parser::parse('<!DOCTYPE html><html lang="en" charset="utf-8"><head><title>Ook!</title></head><body><h1>Ook!</h1><p>Ook-ook? Oooook. Ook ook oook ook oooooook ook ooook ook.</p><p>Eek!</p></body></html>');
?>

or:

<?php
$dom = new dW\HTML5\Document;
$dom->loadHTML('<!DOCTYPE html><html lang="en" charset="utf-8"><head><title>Ook!</title></head><body><h1>Ook!</h1><p>Ook-ook? Oooook. Ook ook oook ook oooooook ook ooook ook.</p><p>Eek!</p></body></html>');
?>