PHPackages                             eleme/easyxml - 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. eleme/easyxml

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

eleme/easyxml
=============

PHP xml library

v0.3.0(11y ago)1729MITPHPPHP &gt;=5.3.0

Since Aug 8Pushed 11y ago15 watchersCompare

[ Source](https://github.com/thbourlove/easyxml)[ Packagist](https://packagist.org/packages/eleme/easyxml)[ RSS](/packages/eleme-easyxml/feed)WikiDiscussions master Synced 1w ago

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

Easyxml
=======

[](#easyxml)

[![Build Status](https://camo.githubusercontent.com/78a92aea078cdcced83b1b918c986c652098b356d180e1cf748063614464655a/68747470733a2f2f7472617669732d63692e6f72672f7468626f75726c6f76652f65617379786d6c2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/thbourlove/easyxml)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a46fb383c385d9d7d66770909608b0c8aa8fe8e5b3c6af731af97775b55cef06/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7468626f75726c6f76652f65617379786d6c2f6261646765732f7175616c6974792d73636f72652e706e673f733d66313133663161623936356636616165663535653439376133333063616637326266663934323031)](https://scrutinizer-ci.com/g/thbourlove/easyxml/)[![Code Coverage](https://camo.githubusercontent.com/c4fdb6e8b1e84e24888bc5264f91bc541406a2e45a5ef3d779d19d61fa55e944/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7468626f75726c6f76652f65617379786d6c2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/thbourlove/easyxml/?branch=master)[![Stable Status](https://camo.githubusercontent.com/939083e46cfe4c3c22f6d12360e9ff9902e36a3953ec4df42b8cd22f3cd887c7/68747470733a2f2f706f7365722e707567782e6f72672f656c656d652f65617379786d6c2f762f737461626c652e706e67)](https://packagist.org/packages/eleme/easyxml)

php xml lib.

Install With Composer:
----------------------

[](#install-with-composer)

```
"require": {
    "eleme/easyxml": "~0.3"
}
```

Example
-------

[](#example)

#### array\_2\_xml(array $array, $structure = '')

[](#array_2_xmlarray-array-structure--)

```
$array = array('abc' => array('cba' => 'abc', 'abc' => ''));
echo array_2_xml($array), "\n";
$structure = '';
echo array_2_xml($array, $structure), "\n";
```

#### json\_2\_xml($json, $structure = '')

[](#json_2_xmljson-structure--)

```
$json = '{"abc":{"cba":"abc","abc":""}}';
echo json_2_xml($json), "\n";
$structure = '';
echo json_2_xml($json, $structure), "\n";
```

#### xml\_2\_array($xml)

[](#xml_2_arrayxml)

```
$xml = 'abc';
echo var_export(xml_2_array($xml)), "\n";
```

#### xml\_2\_json($xml)

[](#xml_2_jsonxml)

```
$xml = 'abc';
echo xml_2_json($xml), "\n";
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

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

Total

4

Last Release

4199d ago

PHP version history (3 changes)v0.0.1PHP &gt;=5.3.3

v0.1.0PHP &gt;=5.4.0

v0.2.0PHP &gt;=5.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a1b5950126e6c7a846b560f0f21d7944b9ef2bb8fba1757c52bc29e4cf6e1a3?d=identicon)[thbourlove](/maintainers/thbourlove)

---

Top Contributors

[![thbourlove](https://avatars.githubusercontent.com/u/1768066?v=4)](https://github.com/thbourlove "thbourlove (9 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eleme-easyxml/health.svg)

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

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

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