stoatally / dom
Life improving enhancements to the standard PHP DOM.
v0.3
2017-11-23 08:28 UTC
Requires
- php: >=7.1.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-09-12 08:16:23 UTC
README
Life improving enhancements to the standard PHP DOM.
Install
The recommended way to install Text Expressions is through composer.
{
"require": {
"stoatally/dom": "0.*"
}
}
Usage
Create a document factory:
use Stoatally\Dom\DocumentFactory; $factory = new DocumentFactory();
Set the text content of a node:
$document = $factory->createFromString('<p/>'); $document->select('p')->setContents('PHP <3'); // > <p>PHP <3</p>
For more comprehensive examples see the examples and tests directories.