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

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

greenterose/xml
===============

XML generación de documentos electrónicos, Facturacion Electrónica SUNAT - Perú

v2.1.5(7y ago)098MITPHPPHP &gt;=5.5.9

Since Oct 14Pushed 6y agoCompare

[ Source](https://github.com/osktgui/greenter-xml)[ Packagist](https://packagist.org/packages/greenterose/xml)[ Docs](https://github.com/giansalex/greenter-xml)[ RSS](/packages/greenterose-xml/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (5)Versions (21)Used By (0)

XML - Greenter
==============

[](#xml---greenter)

[![Travis-CI](https://camo.githubusercontent.com/192a34563dacb0177f1bea4959a30475ea467274e3345f0ea69dff0c34029e38/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6769616e73616c65782f677265656e7465722d786d6c2e7376673f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://travis-ci.org/giansalex/greenter-xml)[![Coverage Status](https://camo.githubusercontent.com/f578c1ae69972274eb1f726eb822052efc1010644e57b5a1be2be03b4dcee20f/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f6769616e73616c65782f677265656e7465722d786d6c2e7376673f7374796c653d666c61742d737175617265266272616e63683d6d6173746572)](https://coveralls.io/github/giansalex/greenter-xml?branch=master)[![Codacy Badge](https://camo.githubusercontent.com/7099b44c95d16b443bf1de484855037abb220184d75e8868762d47879b97ff13/68747470733a2f2f6170692e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6263366630623334386165633462356462393536383135636362633332646161)](https://www.codacy.com/app/giansalex/greenter-xml?utm_source=github.com&utm_medium=referral&utm_content=giansalex/greenter-xml&utm_campaign=Badge_Grade)
Generador de XML basados en el estandar UBL v2.0, v2.1 para la eleaboración de comprobantes electrónicos según normativa de SUNAT. Esta libreria forma parte de [Greenter](https://github.com/giansalex/greenter)

Install
=======

[](#install)

```
composer require greenter/xml
```

### Documentos Soportados.

[](#documentos-soportados)

- Factura Electrónica v2.0, v2.1
- Boleta Electrónica v2.0, v2.1
- Nota de Crédito Electrónica v2.0, v2.1
- Nota de Débito Electrónica v2.0, v2.1
- Resumen Diario de Boletas v2.1
- Comunicación de Bajas v2.0
- Guia Remisión Electrónica v2.1
- Retención Electrónica v2.0
- Percepción Electrónica v2.0
- Resumen de Reversiones v2.0

Example
-------

[](#example)

```
use Greenter\Xml\Builder\InvoiceBuilder;

$invoice = createInvoice(); // create a custom new Invoice()

$builder = new InvoiceBuilder();
$xml = $builder->build($invoice);

echo $xml;
```

Reference
---------

[](#reference)

- [Ubl 2.0](http://www.datypic.com/sc/ubl20/)
- [Ubl 2.1](http://www.datypic.com/sc/ubl21/)

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 96.2% 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 ~33 days

Recently: every ~55 days

Total

19

Last Release

2571d ago

Major Versions

v1.2.7 → v2.1.02018-10-14

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2390649?v=4)[Luis Carlos Oscátegui](/maintainers/osktgui)[@osktgui](https://github.com/osktgui)

---

Top Contributors

[![giansalex](https://avatars.githubusercontent.com/u/14926587?v=4)](https://github.com/giansalex "giansalex (100 commits)")[![thefantas](https://avatars.githubusercontent.com/u/2816602?v=4)](https://github.com/thefantas "thefantas (2 commits)")[![djdnl13](https://avatars.githubusercontent.com/u/4283920?v=4)](https://github.com/djdnl13 "djdnl13 (1 commits)")[![erajuan](https://avatars.githubusercontent.com/u/6233118?v=4)](https://github.com/erajuan "erajuan (1 commits)")

---

Tags

xmlfacturacion-electronicagreenter

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[greenter/xml

XML generación de documentos electrónicos, Facturacion Electrónica SUNAT - Perú

1156.6k3](/packages/greenter-xml)

PHPackages © 2026

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