watoki / dom
A minimal (X)HTML/XML parser for PHP
Installs: 12 954
Dependents: 2
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 2
Open Issues: 0
Requires
- php: >=5.3.8
- watoki/collections: *
Requires (Dev)
- phpunit/phpunit: 3.7.*
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>