PHPackages                             fernandoebert/xml-tools - 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. fernandoebert/xml-tools

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

fernandoebert/xml-tools
=======================

A simple class for working with XML in PHP

1.0.1(4y ago)016MITPHPPHP ^5.6 || ^7.0 || ^8.0

Since Jun 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/FernandoEbert/xml-tools)[ Packagist](https://packagist.org/packages/fernandoebert/xml-tools)[ RSS](/packages/fernandoebert-xml-tools/feed)WikiDiscussions main Synced 1w ago

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

XmlTools @FernandoEbert
=======================

[](#xmltools-fernandoebert)

###### A simple class for working with XML in PHP

[](#a-simple-class-for-working-with-xml-in-php)

Uma simples classe para trabalhar com XML no PHP

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

[](#installation)

xml-tools is available via Composer:

```
"fernandoebert/xml-tools": "1.*"
```

or run

```
composer require fernandoebert/xml-tools
```

Documentation
-------------

[](#documentation)

###### For more details on how to use it, see the example folder with details in the component directory.

[](#for-more-details-on-how-to-use-it-see-the-example-folder-with-details-in-the-component-directory)

Para mais detalhes sobre como usar, veja a pasta de exemplo com detalhes no diretório do componente.

##### xml\_encode

[](#xml_encode)

```

    Value Of _value

         Value of CDATA ]]>

        item01
        item02
        item03
        item04

```

##### xml\_decode in OBJ STDCLASS

[](#xml_decode-in-obj-stdclass)

```
 value01
  [key02] => value02
  [key03] => stdClass Object
    (
      [subkey01] => Array
        (
            [0] => item01
            [1] => item02
            [2] => item03
            [3] => item04
        )

    )
)

// When the index is numeric, returns an array. Ex: [subkey01]
```

##### xml\_decode in ARRAY

[](#xml_decode-in-array)

```
 value01
  [key02] => value02
  [key03] => Array
    (
      [subkey01] => Array
        (
            [0] => item01
            [1] => item02
            [2] => item03
            [3] => item04
        )
    )
)
```

Support
-------

[](#support)

###### If you discover a security issue, send an email to

[](#if-you-discover-a-security-issue-send-an-email-to-fernandoebertebertsystemcom)

Se você descobrir algum problema relacionado à segurança, envie um e-mail para

Thank you

Credits
-------

[](#credits)

- [Fernando Ebert](https://github.com/fernandoebert) (Developer)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/FernandoEbert/xml-tools/blob/main/LICENSE) for more information.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Total

2

Last Release

1508d ago

PHP version history (2 changes)1.0PHP ^5.6 || ^7.2 || ^8.0

1.0.1PHP ^5.6 || ^7.0 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e114a01f8257c31e0cc9f0ae67221b149768fea13b715388b8a47b499944c30?d=identicon)[fernandoebert](/maintainers/fernandoebert)

---

Top Contributors

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

---

Tags

xmlxml\_encodexml\_decodearray2xmlarraytoxmlcdataxml attr

### Embed Badge

![Health badge](/badges/fernandoebert-xml-tools/health.svg)

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

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k135.8M851](/packages/jms-serializer)[veewee/xml

XML without worries

1835.9M29](/packages/veewee-xml)[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)[sabre/xml

sabre/xml is an XML library that you may not hate.

52832.2M131](/packages/sabre-xml)

PHPackages © 2026

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