PHPackages                             petrocki/iof-xml-php - 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. petrocki/iof-xml-php

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

petrocki/iof-xml-php
====================

PHP model classes and XML serialization/deserialization tools for the IOF XML 3.0 data standard

v1.1.0(1mo ago)18MITPHPPHP ^8.3

Since Jul 11Pushed 1mo agoCompare

[ Source](https://github.com/petrocki/iof-xml-php)[ Packagist](https://packagist.org/packages/petrocki/iof-xml-php)[ RSS](/packages/petrocki-iof-xml-php/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (4)Dependencies (5)Versions (5)Used By (0)

IOF XML PHP
===========

[](#iof-xml-php)

[![Latest Version](https://camo.githubusercontent.com/39fde77fd9d5f29585dacc28b1ed459ab1eff735b0c7541cad6fb9c53824e86f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706574726f636b692f696f662d786d6c2d706870)](https://packagist.org/packages/petrocki/iof-xml-php)

PHP model classes and XML serialization/deserialization tools for the [IOF XML 3.0](https://orienteering.sport/iof/it/data-standard-3-0/) data standard.

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

[](#requirements)

- PHP 8.3+

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

[](#installation)

```
composer require petrocki/iof-xml-php
```

Usage
-----

[](#usage)

### Deserializing (XML → PHP objects)

[](#deserializing-xml--php-objects)

```
use IofXmlPhp\Deserializer\IofXmlDeserializer;

$deserializer = new IofXmlDeserializer();
$entryList = $deserializer->deserializeEntryList(file_get_contents('entry-list.xml'));

echo $entryList->getEvent()->getName();
```

### Serializing (PHP objects → XML)

[](#serializing-php-objects--xml)

```
use IofXmlPhp\Serializer\IofXmlSerializer;

$serializer = new IofXmlSerializer();
$xml = $serializer->serializeEntryList($entryList);
```

### Configuring message metadata

[](#configuring-message-metadata)

- IOF XML root message elements (for example `OrganisationList`, `EntryList`, etc.) contain common metadata fields such as the IOF version, creation time, and creator.
- The library provides an `IofMessageFactory` that creates message objects with these metadata fields automatically initialized.

```
use IofXmlPhp\Factory\IofMessageFactory;

$factory = new IofMessageFactory(creator: 'My Application');
$organisationList = $factory->create(OrganisationList::class);
```

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

[](#development)

### Docker

[](#docker)

Build image:

```
docker build -t iof-xml-php:current .
```

Use bash in the container:

```
docker run -it -v "$(pwd):/var/www/iof-xml-php" iof-xml-php:current bash
```

### Regenerating model classes

[](#regenerating-model-classes)

The classes in `src/Model/` and metadata in `src/Metadata/` are auto-generated from `resources/IOF.xsd`. Do not edit them manually. To regenerate after an XSD change:

```
vendor/bin/xsd2php convert config/xsd2php.yaml resources/IOF.xsd
```

### Running tests

[](#running-tests)

```
composer phpunit
```

### Code style

[](#code-style)

```
composer cs-check
composer cs-fix
```

Related
-------

[](#related)

- [IOF XML 3.0 Data Standard](https://github.com/international-orienteering-federation/datastandard-v3) — official IOF repository with the XSD schema and documentation
- [IOF XML 3.0 for .NET / C#](https://github.com/international-orienteering-federation/Dotnet-Client-IOF.XML.V3) — official IOF client library with model classes and utilities
- [IOF XML 3.0 for Java / Kotlin](https://github.com/orienteering-oss/iof-xml) — community library with model classes and utilities
- [IOF XML 3.0 classes and helpers for GO](https://github.com/mikaello/go-iof-xml) — community library with model classes and utilities

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance90

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.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 ~0 days

Total

4

Last Release

48d ago

### Community

Maintainers

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

---

Top Contributors

[![hegeduspeter02](https://avatars.githubusercontent.com/u/109207211?v=4)](https://github.com/hegeduspeter02 "hegeduspeter02 (14 commits)")[![petrocki](https://avatars.githubusercontent.com/u/8874775?v=4)](https://github.com/petrocki "petrocki (1 commits)")

---

Tags

xmlserializerdeserializerorienteeringiofiof-xml

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/petrocki-iof-xml-php/health.svg)

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

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k291.1M379](/packages/masterminds-html5)[horstoeko/zugferd

A library for creating and reading european electronic invoices

4357.1M40](/packages/horstoeko-zugferd)[goetas-webservices/xsd2php-runtime

Convert XSD (XML Schema) definitions into PHP classes

5014.0M50](/packages/goetas-webservices-xsd2php-runtime)[goetas-webservices/xsd2php

Convert XSD (XML Schema) definitions into PHP classes and JMS metadata

2401.8M51](/packages/goetas-webservices-xsd2php)[friendsofcxml/cxml-php

PHP Implementation of cXML Standard

18207.8k11](/packages/friendsofcxml-cxml-php)[goetas/xsd2php-runtime

Convert XSD (XML Schema) definitions into PHP classes

493.3k](/packages/goetas-xsd2php-runtime)

PHPackages © 2026

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