watoki/dom

A minimal (X)HTML/XML parser for PHP

v0.2 2016-05-10 04:58 UTC

This package is not auto-updated.

Last update: 2024-10-26 14:27:39 UTC


README

A very simple (X)HTML/XML parser for PHP. It's goal is that the not manipulated output is as close as possible to the input. This means that it will parse most invalid mark-up without complains.

Usage

Include dom into your project with composer and then:

$parser = new Parser('<my>Custom <html></html></my>');
$parser->getNodes()->first()->setName('Your');
$printer = new Printer();
echo $printer->printNodes($parser->getNodes()); // <Your>Custom <html></html></Your>