PHPackages                             matraux/xml-orm - 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. [Database &amp; ORM](/categories/database)
4. /
5. matraux/xml-orm

ActiveLibrary[Database &amp; ORM](/categories/database)

matraux/xml-orm
===============

A PHP 8.4+ library for converting XML data to typed entities and back, with support for lazy-loading collections and XML namespaces.

2.0.0(5mo ago)00MITPHPPHP ^8.4CI passing

Since Jul 31Pushed 2mo agoCompare

[ Source](https://github.com/matraux/xml-orm)[ Packagist](https://packagist.org/packages/matraux/xml-orm)[ RSS](/packages/matraux-xml-orm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (8)Versions (4)Used By (0)

MATRAUX XML ORM
===============

[](#matraux-xml-orm)

[![Latest Version on Packagist](https://camo.githubusercontent.com/47ffca6d63d0787f24c76b8f50c89826e411aefaffe7c50815a24291867c36df/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6174726175782f786d6c2d6f726d2e7376673f6c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/matraux/xml-orm)[![Last release](https://camo.githubusercontent.com/d63a78a086f140237c37a31afdfa3af2e1a7e6dfab8998a74d9bd9455c09be74/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d6174726175782f786d6c2d6f726d3f646973706c61795f6e616d653d746167266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465)](https://github.com/matraux/xml-orm/releases)[![License: MIT](https://camo.githubusercontent.com/aaaf7fce1d44e884300a55df2c82406f416bc1e5009859d78aedbb69249e4611/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e7376673f6c6f676f3d6f70656e2d736f757263652d696e6974696174697665266c6f676f436f6c6f723d7768697465)](LICENSE)[![PHP](https://camo.githubusercontent.com/2b0538729bedffcc119589c18037b4ebcff0f4d71a1d4320d4904f72dda5810f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e342b2d626c75652e7376673f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://php.net)[![Security Policy](https://camo.githubusercontent.com/33427022d3760656f0ff395d8f48f1230d42ba200881fbcc019aabadf2ffabe8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53656375726974792d506f6c6963792d626c75653f6c6f676f3d62697477617264656e266c6f676f436f6c6f723d7768697465)](./.github/SECURITY.md)[![Contributing](https://camo.githubusercontent.com/bd7eaa3d90ef7ad126e208b3b8adf606e0805b6e28c8c38aa16d52fb38ac7fb5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6e747269627574696e672d44697361626c65642d6c69676874677265793f6c6f676f3d676974687562266c6f676f436f6c6f723d7768697465)](CONTRIBUTING.md)[![QA Status](https://camo.githubusercontent.com/1d2a3c15841c8450791016c279b3094d6bdced096b4cee6e3557374da5018de4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6174726175782f786d6c2d6f726d2f71612e796d6c3f6c6162656c3d5175616c6974792b4173737572616e6365266c6f676f3d636865636b6d617278266c6f676f436f6c6f723d7768697465)](https://github.com/matraux/xml-orm/actions/workflows/qa.yml)[![Issues](https://camo.githubusercontent.com/bcfb5c7ab5743bd7b8b8856b7520679e896d4819e5cc3bdde81a416448c81908/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6d6174726175782f786d6c2d6f726d3f6c6f676f3d676974687562266c6f676f436f6c6f723d7768697465)](https://github.com/matraux/xml-orm/issues)[![Last Commit](https://camo.githubusercontent.com/e09d87d67c77172c651dd135ba83d6d3c5b6405ff160016f178b265f72a84a57/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6d6174726175782f786d6c2d6f726d3f6c6f676f3d676974266c6f676f436f6c6f723d7768697465)](https://github.com/matraux/xml-orm/commits)

Introduction
------------

[](#introduction)

A PHP 8.4+ library for converting XML data to typed entities and back, with support for lazy-loading collections, XML namespaces, and structured entity design. Useful for parsing configuration files, processing structured XML APIs, and working with hierarchical XML data in an object-oriented way.

Features
--------

[](#features)

- Object-oriented XML mapping
- Conversion from XML to typed entities and back
- Lazy-loading collections for efficient memory usage
- Entity objects are mutable and can be freely modified after creation
- Mapping via PHP attributes (no separate config files needed)
- Strict type support with automatic casting
- Native support for nested structures and arrays
- Full support for XML namespaces
- Easy integration with configuration files or XML-based APIs

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

[](#installation)

```
composer require matraux/xml-orm
```

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

[](#requirements)

versionPHPNote1.0.07.4+Support PHP 7.42.0.08.3+Support PHP 8.33.0.08.4+Support PHP 8.4
Examples
--------

[](#examples)

See [Definitions](./docs/Definitions.md) for how to define your own entities and collections.

See [Read](./docs/Read.md) for full reading examples.

```
use Matraux\XmlOrm\Xml\SimpleExplorer;

$explorer = SimpleExplorer::fromString($xml);
$main = MainEntity::fromExplorer($explorer);
echo $main->name;
```

See [Write](./docs/Write.md) for writing examples.

```
$main = MainEntity::create();
$main->name = 'Main entity';

echo $main;
```

Development
-----------

[](#development)

See [Development](./docs/Development.md) for debug, test instructions, static analysis, and coding standards.

Support
-------

[](#support)

For bug reports and feature requests, please use the [issue tracker](https://github.com/matraux/xml-orm/issues).

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance80

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

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

Every ~59 days

Total

3

Last Release

172d ago

Major Versions

1.6.0 → 2.0.02025-11-27

### Community

Maintainers

![](https://www.gravatar.com/avatar/5de8dde6b301108e289df5793632663794646f600ad72d94597c78ecba7408ed?d=identicon)[matraux](/maintainers/matraux)

---

Top Contributors

[![matraux](https://avatars.githubusercontent.com/u/46919973?v=4)](https://github.com/matraux "matraux (67 commits)")

---

Tags

MATRAUXXML ORM

###  Code Quality

TestsCodeception

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[nette/caching

⏱ Nette Caching: library with easy-to-use API and many cache backends.

43518.6M368](/packages/nette-caching)[knplabs/doctrine-behaviors

Doctrine Behavior Traits

92212.7M64](/packages/knplabs-doctrine-behaviors)[nette/database

💾 Nette Database: layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.

5656.7M234](/packages/nette-database)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2592.8M263](/packages/ssch-typo3-rector)[ublaboo/datagrid

DataGrid for Nette Framework: filtering, sorting, pagination, tree view, table view, translator, etc

2971.9M23](/packages/ublaboo-datagrid)[nextras/orm

Nextras Orm framework

3141.2M42](/packages/nextras-orm)

PHPackages © 2026

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