PHPackages                             azurre/php-array-xml-converter - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. azurre/php-array-xml-converter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

azurre/php-array-xml-converter
==============================

Array2XML conversion library credit to lalit.org

0.5.1(9y ago)02601Apache-2.0PHPPHP &gt;=5.3.2

Since Mar 23Pushed 7y ago1 watchersCompare

[ Source](https://github.com/azurre/php-array-xml-converter)[ Packagist](https://packagist.org/packages/azurre/php-array-xml-converter)[ Docs](http://openlss.org)[ RSS](/packages/azurre-php-array-xml-converter/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (16)Used By (1)

lib-array2xml
=============

[](#lib-array2xml)

Array2Xml conversion library credit to lalit.org

Usage
-----

[](#usage)

```
//create XML
$xml = Array2Xml::createXML('root_node_name', $php_array);
echo $xml->saveXML();

//create Array
$array = Xml2Array::createArray($xml);
print_r($array);
```

Array2Xml
---------

[](#array2xml)

@xml example:

```
// Build the array that should be transformed into a XML object.
$array = [
    'title' => 'A title',
    'body' => [
        '@xml' => 'The content for the news item',
    ],
];

// Use the Array2XML object to transform it.
$xml = Array2Xml::createXML('news', $array);
echo $xml->saveXML();
```

This will result in the following.

```

  A title

        The content for the news item

```

Reference
---------

[](#reference)

More complete references can be found here

Changelog
---------

[](#changelog)

### 0.5.1

[](#051)

- Fix fata error when the array passed is empty fixed by pull request #6

### 0.5.0

[](#050)

- add second parameter to XML2Array::createArray for DOMDocument::load, e.g: LIBXML\_NOCDATA
- change method visibility from private to protected for overloading
- Merge pull request #5 to add child xml
- Merge pull request #4 to change method visibility and add second parameter for load.

### 0.1.0

[](#010)

- Initial Release

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.1% 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 ~121 days

Recently: every ~331 days

Total

12

Last Release

3512d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f5bbeafb1d06ec9c1ba940980a19a3fd3902cef3499a446726677986be73b0ec?d=identicon)[a.milenin](/maintainers/a.milenin)

---

Top Contributors

[![nullivex](https://avatars.githubusercontent.com/u/2321375?v=4)](https://github.com/nullivex "nullivex (18 commits)")[![h3rj4n](https://avatars.githubusercontent.com/u/738683?v=4)](https://github.com/h3rj4n "h3rj4n (5 commits)")[![godsgood33](https://avatars.githubusercontent.com/u/1922710?v=4)](https://github.com/godsgood33 "godsgood33 (1 commits)")[![azurre](https://avatars.githubusercontent.com/u/2183975?v=4)](https://github.com/azurre "azurre (1 commits)")[![kuangjy2](https://avatars.githubusercontent.com/u/2821471?v=4)](https://github.com/kuangjy2 "kuangjy2 (1 commits)")[![max-kovpak](https://avatars.githubusercontent.com/u/8402366?v=4)](https://github.com/max-kovpak "max-kovpak (1 commits)")[![justplaymore](https://avatars.githubusercontent.com/u/1845780?v=4)](https://github.com/justplaymore "justplaymore (1 commits)")[![doyjo](https://avatars.githubusercontent.com/u/3947855?v=4)](https://github.com/doyjo "doyjo (1 commits)")

---

Tags

xmlarrayxml conversionarray conversion

### Embed Badge

![Health badge](/badges/azurre-php-array-xml-converter/health.svg)

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

###  Alternatives

[openlss/lib-array2xml

Array2XML conversion library credit to lalit.org

31053.4M49](/packages/openlss-lib-array2xml)[digitickets/lalit

GitHub copy of LaLit's XML2Array and Array2XML

721.6M7](/packages/digitickets-lalit)[hiraku/xml_builder

Simple DSL for building XML

141.6k1](/packages/hiraku-xml-builder)

PHPackages © 2026

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