Life improving enhancements to the standard PHP DOM.

v0.3 2017-11-23 08:28 UTC

This package is not auto-updated.

Last update: 2024-03-15 20:14:12 UTC


README

Life improving enhancements to the standard PHP DOM.

Build Status

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 &lt;3</p>

For more comprehensive examples see the examples and tests directories.