PHPackages                             veewee/xml - 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. veewee/xml

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

veewee/xml
==========

XML without worries

4.10.0(1mo ago)1835.9M—2.7%11[1 issues](https://github.com/veewee/xml/issues)[1 PRs](https://github.com/veewee/xml/pulls)17MITPHPPHP ~8.4.0 || ~8.5.0CI passing

Since Feb 5Pushed 1mo ago4 watchersCompare

[ Source](https://github.com/veewee/xml)[ Packagist](https://packagist.org/packages/veewee/xml)[ GitHub Sponsors](https://github.com/veewee)[ RSS](/packages/veewee-xml/feed)WikiDiscussions 4.x Synced 1mo ago

READMEChangelog (10)Dependencies (53)Versions (61)Used By (17)

&lt;XML /&gt;
=============

[](#xml-)

*XML without worries*

This package aims to provide all tools for dealing with XML in PHP without worries. You will find a type-safe, declarative API that deals with errors for you!

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

[](#installation)

```
composer require veewee/xml

```

Components
----------

[](#components)

- [DOM](docs/dom.md): Operate on XML documents through the DOM API.
- [Encoding](docs/encoding.md): Provides `xml_encode()` and `xml_decode()` so that you can deal with XML just like you deal with JSON!
- [ErrorHandling](docs/error-handling.md): Provides the tools you need to safely deal with XML.
- [Reader](docs/reader.md): Memory-safe XML reader.
- [Writer](docs/writer.md): Memory-safe XML writer.
- [XSD](docs/xsd.md): Tools for working with XSD schemas.
- [XSLT](docs/xslt.md): Transform XML documents into something else.

Spec compliance
---------------

[](#spec-compliance)

Starting from v4, this package opt's-in to the [spec compliance mode](https://wiki.php.net/rfc/opt_in_dom_spec_compliance) that has been released in PHP 8.4. Since these changes cannot be ported to older PHP versions, v3 of this package will be maintained actively for a longer period. This will give you a grace period to upgrade your PHP versions, packages, ... This little bump in the road is necessary to provide you with a better, more stable and spec-compliant package in the future.

Support table:

veewee/xmlPHPLTS3.0 - 3.18.1, 8.2, 8.3NO3.28.2, 8.3NO3.3+8.2, 8.3, 8.4, 8.5YES4.0+8.4+YESRoadmap
-------

[](#roadmap)

These components are not implemented yet, but have been thought about. Stay tuned if you want to use these!

- External: [Saxon/C](https://www.saxonica.com/saxon-c/php_api.xml): XSLT 3.0/2.0, XQuery 3.1, XPath 3.1 and Schema Validation 1.0/1.1
    - Awaiting PHP8 support:
- External: [XSLT2](https://github.com/genkgo/xsl) (prefer saxon/c)

About
-----

[](#about)

### Submitting bugs and feature requests

[](#submitting-bugs-and-feature-requests)

Bugs and feature request are tracked on [GitHub](https://github.com/veewee/xml/issues). Please take a look at our rules before [contributing your code](CONTRIBUTING.md).

### License

[](#license)

veewee/xml is licensed under the [MIT License](LICENSE).

###  Health Score

70

—

ExcellentBetter than 100% of packages

Maintenance89

Actively maintained with recent releases

Popularity61

Solid adoption and visibility

Community31

Small or concentrated contributor base

Maturity84

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 95.3% 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 ~33 days

Recently: every ~0 days

Total

58

Last Release

52d ago

Major Versions

2.14.0 → 3.0.02024-01-14

3.2.0 → 4.0.0-alpha12024-09-20

3.3.0 → 4.0.02024-11-20

3.4.0 → 4.3.02025-10-24

3.6.0 → 4.6.02026-03-19

PHP version history (9 changes)v0.1.0PHP ^8.0

v1.1.0PHP ~8.0.0 || ~8.1.0

2.0.0PHP ~8.1.0 || ~8.2.0

2.12.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

3.2.0PHP ~8.2.0 || ~8.3.0

4.0.0-alpha1PHP ~8.4.0

3.3.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0

3.4.0PHP ~8.3.0 || ~8.4.0 || ~8.5.0

4.3.0PHP ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0cb7e57de4834c7e94552864acb7c5640725b5ec0ea8f087ebbf6761dd3c206?d=identicon)[veewee](/maintainers/veewee)

---

Top Contributors

[![veewee](https://avatars.githubusercontent.com/u/1618158?v=4)](https://github.com/veewee "veewee (324 commits)")[![lykciv](https://avatars.githubusercontent.com/u/3390098?v=4)](https://github.com/lykciv "lykciv (4 commits)")[![BrentRobert](https://avatars.githubusercontent.com/u/6866325?v=4)](https://github.com/BrentRobert "BrentRobert (4 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (4 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (2 commits)")[![aubryfr](https://avatars.githubusercontent.com/u/2647490?v=4)](https://github.com/aubryfr "aubryfr (1 commits)")[![bastien-phi](https://avatars.githubusercontent.com/u/10199039?v=4)](https://github.com/bastien-phi "bastien-phi (1 commits)")

---

Tags

array-to-xmldecodedomdom-manipulationencodehacktoberfestreaderwriterxmlxml-to-arrayxpathxsdxsltxmldomwriterreaderxsdXpathxsltarray-to-xmlxml-to-arraydom-manipulationxml\_encodexml\_decode

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/veewee-xml/health.svg)

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

###  Alternatives

[php-soap/wsdl-reader

A WSDL reader in PHP

212.3M9](/packages/php-soap-wsdl-reader)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[roave/backward-compatibility-check

Tool to compare two revisions of a public API to check for BC breaks

5953.3M56](/packages/roave-backward-compatibility-check)[phpro/soap-client

A general purpose SoapClient library

8885.6M46](/packages/phpro-soap-client)[sabre/xml

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

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

HTML/XML querying and processing (like jQuery)

8197.0M27](/packages/querypath-querypath)

PHPackages © 2026

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