PHPackages                             giunashvili/xml-parser - 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. giunashvili/xml-parser

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

giunashvili/xml-parser
======================

This is simple package to parse array into xml simply and easy.

2.0.1(5y ago)04631MITPHPCI failing

Since May 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/giunashvili/xml-parser)[ Packagist](https://packagist.org/packages/giunashvili/xml-parser)[ Docs](https://github.com/giunashvili/xml-parser)[ RSS](/packages/giunashvili-xml-parser/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (6)Dependencies (2)Versions (7)Used By (1)

XML Parser
==========

[](#xml-parser)

XML Parser is a simple php package to parse xml in and out simply and easy.

you could:

- Parse array into xml
- Parse xml into array

### Installation

[](#installation)

Installation is fairly simple:

```
$ composer require giunashvili/xml-parser
```

### Usage

[](#usage)

---

##### Array into XML

[](#array-into-xml)

```
use Giunashvili\XMLParser\Parse;

$arr = [
    'animals' => [
        'bear'      => 'black',
        'fox'       => 'red',
        'Kangaroo'  => 'Jack'
    ],
    'plants' => [
        'bamboo',
        'apple'
    ]
];

$xmlWithoutDefinedWrapper = Parse :: arrayAsXml( $arr );

echo $xmlWithoutDefinedWrapper;
/**

                  black
                   red
              Jack

                bamboo
                bamboo

*/

$xmlWithDefinedWrapper    = Parse :: arrayAsXml( $arr, 'classifications' );

echo $xmlWithoutDefinedWrapper;
/**

                  black
                   red
              Jack

                bamboo
                bamboo

*/
```

##### XML into Array

[](#xml-into-array)

```
use Giunashvili\XMLParser\Parse;

$xml =
    ''.
        ''.
            ''.      'black'.   ''.
            ''.       'red'.     ''.
            ''.  'Jack'.    ''.
        ''.
        ''.
            ''.    'bamboo'.  ''.
            ''.    'bamboo'.  ''.
        ''.
    '';

$arr = Parse :: xmlAsArray( $xml );

print_r( $arr );
/**
    [
        'classification' => [
            [
                'animals' => [
                    'bear'      => 'black',
                    'fox'       => 'red',
                    'Kangaroo'  => 'Jack'
                ],
                'plants' => [
                    'item-0'    => 'bamboo',
                    'item-1'    => 'apple'
                ]
            ]
        ]
    ]
*/
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

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

Total

6

Last Release

2184d ago

Major Versions

1.1.0 → 2.0.02020-05-22

### Community

Maintainers

![](https://www.gravatar.com/avatar/96e9eccbb84748bae1556b79855aca2374472f240303ba20d1cc7c213d252beb?d=identicon)[giunashvili](/maintainers/giunashvili)

---

Top Contributors

[![giunashvili](https://avatars.githubusercontent.com/u/39676079?v=4)](https://github.com/giunashvili "giunashvili (10 commits)")

---

Tags

xmlparserparseparsingxml-parserxml-parsingparse-xml

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/giunashvili-xml-parser/health.svg)

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

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[imangazaliev/didom

Simple and fast HTML parser

2.2k2.3M64](/packages/imangazaliev-didom)[orchestra/parser

XML Document Parser for Laravel and PHP

4581.7M5](/packages/orchestra-parser)[jakubledl/dissect

Lexing and parsing in pure PHP

2244.6M11](/packages/jakubledl-dissect)[laravie/parser

XML Document Parser for PHP

2342.1M8](/packages/laravie-parser)[parsica-php/parsica

The easiest way to build robust parsers in PHP.

412140.4k4](/packages/parsica-php-parsica)

PHPackages © 2026

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