PHPackages                             talesoft/tale-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. talesoft/tale-dom

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

talesoft/tale-dom
=================

XML and HTML manipulation

0.1(9y ago)075MITPHPPHP &gt;=5.5.0

Since May 20Pushed 9y ago3 watchersCompare

[ Source](https://github.com/Talesoft/tale-dom)[ Packagist](https://packagist.org/packages/talesoft/tale-dom)[ Docs](http://docs.talesoft.io/tale-framework/tale/dom)[ RSS](/packages/talesoft-tale-dom/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Tale Dom
========

[](#tale-dom)

**A Tale Framework Component**

What is Tale Dom?
=================

[](#what-is-tale-dom)

Installation
============

[](#installation)

Install via Composer

```
composer require "talesoft/tale-dom:*"
composer install
```

Usage
=====

[](#usage)

Parsing
-------

[](#parsing)

```
use Tale\Dom;

$element = Dom::fromString('Hello World!');

var_dump($element->getName()); //h1
var_dump($element->getText()); //Hello World!
```

Manipulation
============

[](#manipulation)

```
use Tale\Dom;

$m = Dom::manipulate('');

$m->append('db')
    ->append('host')->setText('localhost')
    ->after('password')->setText('12345')
    ->parent
  ->after('logging')
    ->append('adapter')->setText('file')
    ->append('path')->setText('./errors.log')

echo $m; //localhost12345...
```

...or shorter...

```
use Tale\Dom;

$m = Dom::manipulate('

');

$m->query('host')->setText('localhost');
$m->query('db > password')->setText('12345');
$m->query('logging adapter')->setText('file');
$m->query('#logPath')->setText('./errors.log');

echo $m; //localhost12345...
```

...or even shorter...

```
use Tale\Dom;

$m = Dom::manipulate([
    'config' => [
        'host' => 'localhost',
        'password' => '12345'
    ],
    'logging' => [
        'adapter' => 'file',
        'path#logPath'
    ]
]);

$m->query('#logPath')->setText('./errors.log');

echo $m; //localhost12345...
```

Dumping
-------

[](#dumping)

```
use Tale\Dom;

$element = Dom::fromString([
    'html' => [
        'head' => [
            'meta[charset="utf-8"]',
            'title' => 'My awesome Tale Dom Website!'
        ]
    ]
]);

$prettyFormatter = new Dom\Formatter(['pretty' => true]);
$htmlFormatter = new Dom\Html\Formatter(['pretty' => true]);

echo $element; //...

echo $element->getString($prettyFormatter);
/*

    My awesome Tale Dom Website!
    ...

*/

echo $element->getString($htmlFormatter);
/*

    My awesome Tale Dom Website!
    ...

*/
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3641d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/75a80e0830e63c723808d021d3a1648a2643db60f4ac2e40842da05f227f956b?d=identicon)[TorbenKoehn](/maintainers/TorbenKoehn)

---

Top Contributors

[![TorbenKoehn](https://avatars.githubusercontent.com/u/1403556?v=4)](https://github.com/TorbenKoehn "TorbenKoehn (9 commits)")

---

Tags

xmlhtmlsvgparsewritemarkupxhtml

### Embed Badge

![Health badge](/badges/talesoft-tale-dom/health.svg)

```
[![Health](https://phpackages.com/badges/talesoft-tale-dom/health.svg)](https://phpackages.com/packages/talesoft-tale-dom)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M227](/packages/masterminds-html5)[imangazaliev/didom

Simple and fast HTML parser

2.2k2.3M64](/packages/imangazaliev-didom)[querypath/querypath

HTML/XML querying and processing (like jQuery)

8197.0M27](/packages/querypath-querypath)[rumenx/php-sitemap

Framework-agnostic Sitemap generator for PHP, Laravel, and Symfony.

1.3k15.1k1](/packages/rumenx-php-sitemap)[rct567/dom-query

DomQuery is a PHP library that allows easy 'jQuery like' DOM traversing and manipulation

134261.0k4](/packages/rct567-dom-query)[machy8/xhtml-formatter

Simple, lightweight, customizable (X)HTML and XML formatter / beautifier.

13181.6k6](/packages/machy8-xhtml-formatter)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
