Skip to content

blockifywp/dom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blockify DOM

DOM manipulation library for PHP.

Installation

composer require blockify/dom

Usage

PHP

First, require Composer's autoloader:

require_once __DIR__ . '/vendor/autoload.php';

Then, use the library:

use Blockify\Dom\DOM;

$html = '<h1>Hello, World!</h1>';

$dom = DOM::parse( $html );

$h1 = $dom->getElementsByTagName('h1')[0];

$h1->setAttribute('class', 'heading');

echo $dom->saveHTML();

About

Html DOM manipulation library for PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages