watoki / dom
A minimal (X)HTML/XML parser for PHP
v0.2
2016-05-10 04:58 UTC
Requires
- php: >=5.3.8
- watoki/collections: *
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2026-02-28 21:18:00 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>