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

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

xarenisoft/xml
==============

XmlModel

0.2.9(1y ago)196PHPPHP &gt;=7.0.0CI failing

Since Nov 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/DanNYSPD/Transformation)[ Packagist](https://packagist.org/packages/xarenisoft/xml)[ RSS](/packages/xarenisoft-xml/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (14)Used By (0)

Deserializer Xml to Php classes
===============================

[](#deserializer-xml-to-php-classes)

[![Build Status](https://camo.githubusercontent.com/7d9356365650ef385759fb26395c4badccda8ffc46cf60728ca4b025266632ad/68747470733a2f2f7472617669732d63692e6f72672f44616e4e595350442f5472616e73666f726d6174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/DanNYSPD/Transformation)

Xarenisoft XmlModel is a simple class that you can extend to deserialize and XML Tag and its attributes to a Php Class.

```
class Person extends XmlModel{
    public $attributes=['name','age'];
    public $name; //in this property the value of name attribute will be stored if it's found when you call parseAttributes method

    public $age;//another attribute

    //you can also define a children array to indicate that Person has an Addres Child or children (internally a getElementsByTag is use)
    public $children=[
        'Address'=>Address::class # with this , we indicate that we are gonna take only the first element, if we have a set of elements we can use * after the propertyName
        'Friends*'=>Friend::class
    ]
    public $Address;
    /***
     *
     * @var Friend[]
     */
    public $Friends;

}
class Address extends XmlModel{
    //if we not set the attributes array by default all the class properties will be taken as attributes and the names of the properties will be used as the attribute name.
    public $street;
}
class Friend {
    public $name;
}

#some code before to get the node:
$person= new Person($node);
$person->parseAttributes();
$person->parseChildren();
#now the object person has the attributes (if they are correctly defined in the node) and the Friends array populated with the Objects.
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Recently: every ~457 days

Total

12

Last Release

532d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c88bb9614ad980d664e393284ce1b43c8ba4c65554e003c7eb94091778c9bb7?d=identicon)[NYSPD](/maintainers/NYSPD)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19139.2M47](/packages/mck89-peast)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9843.5k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

45153.1k6](/packages/jstewmc-rtf)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

113.2k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

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