PHPackages                             ericmorand/xml-to-array - 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. ericmorand/xml-to-array

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

ericmorand/xml-to-array
=======================

Simple XML-to-array converter

v1.0.1(7y ago)0297ISCPHP

Since Feb 27Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ericmorand/xml-to-array)[ Packagist](https://packagist.org/packages/ericmorand/xml-to-array)[ RSS](/packages/ericmorand-xml-to-array/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Plain and simple XML-to-array converter
=======================================

[](#plain-and-simple-xml-to-array-converter)

[![Latest Stable Version](https://camo.githubusercontent.com/e4bb2d86ad92c44d8644c6ab8f08c29ecd59c18abe507bb9c54f45e375003529/68747470733a2f2f706f7365722e707567782e6f72672f657269636d6f72616e642f786d6c2d746f2d61727261792f76657273696f6e)](https://packagist.org/packages/ericmorand/xml-to-array) [![Build Status](https://camo.githubusercontent.com/85baebdab235bfc83f001f1b893239f115b3f7ac74d1623e0ceda114e62aec96/68747470733a2f2f7472617669732d63692e6f72672f657269636d6f72616e642f786d6c2d746f2d61727261792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ericmorand/xml-to-array)

This package provides a very simple converter to convert an XML string to an array. No attributes support, no complex logic, just a plain and simple converter that just works.

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

[](#installation)

```
composer require ericmorand/xml-to-array
```

Usage
-----

[](#usage)

```
;

$array = $converter->convertXML($xml);
```

By running this code, `$array` would contain:

```
[
    'prop0' => null,
    'prop1' => 'foo',
    'prop2' => 'foo',
    'prop3' => [
        'prop0' => null,
        'prop1' => 'foo',
        'prop2' => 'foo'
    ]
]
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~4 days

Total

2

Last Release

2674d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/125664?v=4)[Eric MORAND](/maintainers/ericmorand)[@ericmorand](https://github.com/ericmorand)

---

Top Contributors

[![ericmorand](https://avatars.githubusercontent.com/u/125664?v=4)](https://github.com/ericmorand "ericmorand (6 commits)")

---

Tags

phpxml

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ericmorand-xml-to-array/health.svg)

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

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19037.7M41](/packages/mck89-peast)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9642.0k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

46143.1k6](/packages/jstewmc-rtf)[moonshine/layouts-field

Field for repeating groups of fields for MoonShine

107.9k](/packages/moonshine-layouts-field)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

112.9k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

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