PHPackages                             sterlingdesign/dom - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. sterlingdesign/dom

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

sterlingdesign/dom
==================

Usability Enhancements to the PHP DOM classes

2.0.1(3y ago)0131MITPHPPHP &gt;=7.1

Since Dec 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/sterlingdesign/dom)[ Packagist](https://packagist.org/packages/sterlingdesign/dom)[ RSS](/packages/sterlingdesign-dom/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (1)Versions (8)Used By (1)

sterlingdesign/dom
==================

[](#sterlingdesigndom)

Functional Enhancements for PHP's Document Object Model (DOM)
-------------------------------------------------------------

[](#functional-enhancements-for-phps-document-object-model-dom)

### Overview

[](#overview)

This package extends the existing PHP DOM with functionality that is missing from the core library. The most important and useful feature is the automation of the use of XPath to select one or more nodes, set element or attribute values, and get those element or attribute values. The ElementNode is also extended in order to automate the creation of children nodes, including shortcuts for some common HTML/XHTML element nodes.

### Installation

[](#installation)

`composer require sterlingdesign/DOM`

### Basic Usage

[](#basic-usage)

Here are a few examples of some features (see test/testdom.php):

```
