PHPackages                             theseer/fdomdocument - 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. theseer/fdomdocument

AbandonedArchivedLibrary

theseer/fdomdocument
====================

The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.

1.6.7(4y ago)24742.2M—3.9%1717BSD-3-ClausePHPPHP &gt;=5.3.3

Since Apr 24Pushed 4y ago5 watchersCompare

[ Source](https://github.com/theseer/fDOMDocument)[ Packagist](https://packagist.org/packages/theseer/fdomdocument)[ Docs](https://github.com/theseer/fDOMDocument)[ RSS](/packages/theseer-fdomdocument/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (14)Used By (17)

fDOMDocument
============

[](#fdomdocument)

> ⚠️ **This project is Archived**There will be no new features or general bugfixes. In case you found a security problem, please contact me and I'll consider creating an additional release addressing it. Otherwise no updates are planned. The current (potentially final) release `1.6.7` should work under PHP 5.3.3 - PHP 8.1.

The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.

Requirements
------------

[](#requirements)

```
PHP: 5.3.3 (5.3.0-5.3.2 had serious issues with spl stacked autoloaders)
Extensions: dom, libxml

Aus of 1.6.7, tests will require PHPUnit 8.5 and PHP 7.3+

```

Installation
------------

[](#installation)

Apart from cloning this repository, fDOMDocument can be installed using by any of the following methods.

##### Composer

[](#composer)

As fDOMDocument is a library and does not provide any cli tools, you can only add it to your own project:

```
{
    "require": {
        "theseer/fdomdocument": "^1.6"
    }
}

```

##### YUM/DNF (Fedora / Redhat / CentOS)

[](#yumdnf-fedora--redhat--centos)

The following command will install fDOMDocument via its RPM package:

```
sudo yum install php-theseer-fDOMDocument

```

Usage
-----

[](#usage)

fDOMDocument is designed as a drop in replacement for DOMDocument. You can either use the composer generated autoloader or the provided one.

Usage Samples
-------------

[](#usage-samples)

```

```

Changelog
---------

[](#changelog)

##### Release 1.6.7

[](#release-167)

- Add `#[\ReturnTypeWillChange]` attribute to shut up PHP 8.1 notices on return types
- Fix deprecation notice for passing `NULL` where `int` is expected

##### Release 1.6.6

[](#release-166)

- Merge PRs 33+34: Add support for parameter "asTextNode" to fDOMElement::appendElement(). fDOMElement::appendElementNS() and fDOMElement::appendElementPrefix

##### Releaes 1.6.5

[](#releaes-165)

- Revert git exports limitations as they cause unwanted side effects

##### Releaes 1.6.4

[](#releaes-164)

- Merge PR 31 to optimize travis builds and git exports (Thanks to @willemstuursma)

##### Releaes 1.6.3

[](#releaes-163)

- Merge PR 29 to fix issues with PHP 7.2

##### Release 1.6.2

[](#release-162)

- Handle empty string warings from PHP

##### Release 1.6.1

[](#release-161)

- Added Workaround for [HHVM Issue #5412](https://github.com/facebook/hhvm/issues/5412)

##### Release 1.6.0

[](#release-160)

- Added `createElement*` to `fDOMEmenet` and `fDOMDocumentFragment` as shortcuts
- Added `appendElement*` to `fDOMDocumentFragment` as shortcuts
- Enhanced the exception messages of save errors with filenames to contain the filename
- Fixed fDomDocumentFragment::\_\_toString to actually work
- Updated / Added some tests

##### Release 1.5.0

[](#release-150)

- Added `select` to `fDOMDocument`,`fDOMElement` and `fDOMNode` to support CSS Selectors in favor of XPath only to find nodes
- Added `query` and `queryOne` forwardes to `fDOMNode`

##### Release 1.4.3

[](#release-143)

- Added `saveXML` and `saveHTML` to `fDOMNode` and `fDOMElement` as a shortcut to calling those methods on the ownerDocument

##### Release 1.4.2

[](#release-142)

- Added `__toString` support to `fDOMNode`, `fDOMElement`, `fDOMDocument` and `fDOMDocumentFragment`

##### Release 1.4.1

[](#release-141)

- Removed unused Interface `fDOMNodeInterface` from code base

##### Release 1.4.0

[](#release-140)

- Added XPathQuery helper object, allowing for a prepared statement alike API around XPath

##### Release 1.3.2

[](#release-132)

- Added `__clone` method to reset domxpath object when domdocument gets cloned (Thanks to Markus Ineichen for pointing it out)

##### Release 1.3.1

[](#release-131)

- PHP 5.3 compatibility: changed interal behavior for incompatible changes from PHP 5.3 to 5.4 (Thanks to Jens Graefe for pointing it out)

##### Release 1.3.0

[](#release-130)

- Added appendTextNode method (Thanks to Markus Ineichen)
- Added appendElement / appendElementNS to DOMDocument to support documentElement "creation" (Thanks to Markus Ineichen)
- Overwrite createElement / createElementNS to throw exception on error
- Removed fDOMFilter code: Unmaintained and broken in its current form
- Added (static) Flag for fDOMException to globally enable full exception message
- Added Unit tests

##### Release 1.2.4

[](#release-124)

- PHP 5.4 compatibilty: added support for optional options bitmask on additional methods

##### Release 1.2.3

[](#release-123)

- Cleanup code style to adhere coding standard
- Added entity support for Attributes
- Added phpcs file to make coding standard public

##### Release 1.2.2

[](#release-122)

- Fix Exception to not overwrite final methods of \\Exception

##### Release 1.2.1

[](#release-121)

- Changed fDOMDocument to be no longer final, use lsb to lookup actual class in constructor. This should fix test/mock issues.

##### Release 1.2.0

[](#release-120)

- Changed fException to be more compatible with standard exceptions by adding a switch to get full info by getMessage()
- Merged setAttributes() and setAttributesNS() methods from Andreas
- Fixed internal registerNamespace variable mixup

##### Release 1.1.0

[](#release-110)

- Renamed files to mimic classname cases
- Fixed inSameDocument to support DOMDocument as well as DOMNodes
- Added fDOMXPath class providing queryOne(), qoute() and prepare()
- Adjusted forwarders in fDOMDocument to make use of new object
- Fixed various return values to statically return true for compatibility with original API
- Applied Workaround to fix potential problems with lost references to instances of fDOMDocument
- Support registerPHPFunctions
- Bump Copyright
- Added missing docblocks

##### Release 1.0.2

[](#release-102)

- Indenting and typo fixes, minor bugfixes

##### Release 1.0.1

[](#release-101)

- Bugfix: typehints corrected

##### Release 1.0.0

[](#release-100)

- Initial release

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity66

Solid adoption and visibility

Community32

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 84.5% 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

Every ~266 days

Recently: every ~436 days

Total

13

Last Release

1574d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0fc8fe1ac311fb26137cc3b26cd6c1bbb58c9ac4f287eb9d8242a741cef9a502?d=identicon)[theseer](/maintainers/theseer)

---

Top Contributors

[![theseer](https://avatars.githubusercontent.com/u/111333?v=4)](https://github.com/theseer "theseer (125 commits)")[![robo47](https://avatars.githubusercontent.com/u/110477?v=4)](https://github.com/robo47 "robo47 (5 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (4 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (3 commits)")[![tommygnr](https://avatars.githubusercontent.com/u/929392?v=4)](https://github.com/tommygnr "tommygnr (2 commits)")[![FloEberle](https://avatars.githubusercontent.com/u/412740?v=4)](https://github.com/FloEberle "FloEberle (2 commits)")[![JensGraefe](https://avatars.githubusercontent.com/u/1464688?v=4)](https://github.com/JensGraefe "JensGraefe (2 commits)")[![ahabel](https://avatars.githubusercontent.com/u/179560?v=4)](https://github.com/ahabel "ahabel (2 commits)")[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (1 commits)")[![glensc](https://avatars.githubusercontent.com/u/199095?v=4)](https://github.com/glensc "glensc (1 commits)")[![rwos](https://avatars.githubusercontent.com/u/747372?v=4)](https://github.com/rwos "rwos (1 commits)")

### Embed Badge

![Health badge](/badges/theseer-fdomdocument/health.svg)

```
[![Health](https://phpackages.com/badges/theseer-fdomdocument/health.svg)](https://phpackages.com/packages/theseer-fdomdocument)
```

###  Alternatives

[magento/community-edition

Magento 2 (Open Source)

12.1k52.1k10](/packages/magento-community-edition)[sabre/dav

WebDAV Framework for PHP

1.7k14.8M67](/packages/sabre-dav)[easyrdf/easyrdf

EasyRdf is a PHP library designed to make it easy to consume and produce RDF.

62231.5M42](/packages/easyrdf-easyrdf)[sabre/xml

sabre/xml is an XML library that you may not hate.

52832.2M131](/packages/sabre-xml)[shopware/shopware

Shopware 5 is an open source e-commerce software made in Germany

1.3k746.6k35](/packages/shopware-shopware)[wheelpros/fitment-platform-api

Magento 2 (Open Source)

12.1k1.2k](/packages/wheelpros-fitment-platform-api)

PHPackages © 2026

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