PHPackages                             blvckgvd/xml\_lib - 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. blvckgvd/xml\_lib

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

blvckgvd/xml\_lib
=================

PHP library to work with XML files without any problems

1.0.0(2y ago)05MITPHPPHP &gt;=5.5

Since Jun 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/BLVCKGVD/xml_lib)[ Packagist](https://packagist.org/packages/blvckgvd/xml_lib)[ RSS](/packages/blvckgvd-xml-lib/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

xml\_lib
========

[](#xml_lib)

Light weight library to convert XML files to JSON or Array

[![MIT License](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://choosealicense.com/licenses/mit/)

[![PHP](https://camo.githubusercontent.com/acda1c13fec7d45e33aa5e2bbf9ec2ce7dceaaa6d320c0e75a1301650214ade1/68747470733a2f2f62616467656e2e6e65742f62616467652f7068702f2532322533453d352e352532322f626c7565)](https://camo.githubusercontent.com/acda1c13fec7d45e33aa5e2bbf9ec2ce7dceaaa6d320c0e75a1301650214ade1/68747470733a2f2f62616467656e2e6e65742f62616467652f7068702f2532322533453d352e352532322f626c7565)

[![ext-simplexml](https://camo.githubusercontent.com/b51aa0c36b39e310478d8e8cf56686a854ac2d334ca6f3bc5b789c152e267263/68747470733a2f2f62616467656e2e6e65742f62616467652f6578742d73696d706c65786d6c2f2532322a2532322f677265656e)](https://camo.githubusercontent.com/b51aa0c36b39e310478d8e8cf56686a854ac2d334ca6f3bc5b789c152e267263/68747470733a2f2f62616467656e2e6e65742f62616467652f6578742d73696d706c65786d6c2f2532322a2532322f677265656e)

[![ext-json](https://camo.githubusercontent.com/715d76b9621ece17bbc39c3d56186c601d0f68c43873a00ffa4c59dee76bdb0a/68747470733a2f2f62616467656e2e6e65742f62616467652f6578742d6a736f6e2f2532322a2532322f677265656e)](https://camo.githubusercontent.com/715d76b9621ece17bbc39c3d56186c601d0f68c43873a00ffa4c59dee76bdb0a/68747470733a2f2f62616467656e2e6e65742f62616467652f6578742d6a736f6e2f2532322a2532322f677265656e)

[![ext-libxml](https://camo.githubusercontent.com/e4225ccd19d2cbeecef11baa84c2620120f29701d7fb8a1e0c8d6c0775a61d48/68747470733a2f2f62616467656e2e6e65742f62616467652f6578742d6c6962786d6c2f2532322a2532322f677265656e)](https://camo.githubusercontent.com/e4225ccd19d2cbeecef11baa84c2620120f29701d7fb8a1e0c8d6c0775a61d48/68747470733a2f2f62616467656e2e6e65742f62616467652f6578742d6c6962786d6c2f2532322a2532322f677265656e)

[![Made By](https://camo.githubusercontent.com/6d9443e07a0b5c221dcab1f09aac1a912357ccadc733ac67083b52f115c06aa0/68747470733a2f2f62616467656e2e6e65742f62616467652f617574686f722f626c76636b67766428416e746f6e2d5368756c7a68656e6b6f292f726564)](https://camo.githubusercontent.com/6d9443e07a0b5c221dcab1f09aac1a912357ccadc733ac67083b52f115c06aa0/68747470733a2f2f62616467656e2e6e65742f62616467652f617574686f722f626c76636b67766428416e746f6e2d5368756c7a68656e6b6f292f726564)

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

[](#installation)

Install currencylib with composer

```
  composer require blvckgvd/xml_lib
```

Usage/Examples
--------------

[](#usageexamples)

### Get JSON from XML

[](#get-json-from-xml)

```
use Blvckgvd\XmlLib\XmlLib;

public function getArrayFromXml() {
  $json = XmlLib::toJson('');
  return $json;
}
// will return json
```

### Get Array from XML

[](#get-array-from-xml)

```
use Blvckgvd\XmlLib\XmlLib;

public function getArrayFromXml() {
  $arr = XmlLib::toArray('');
  return $arr;
}
// will return array
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

1079d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/blvckgvd-xml-lib/health.svg)

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

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[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)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

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

PHPackages © 2026

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