PHPackages                             dev-lancer/jpk-generator - 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. dev-lancer/jpk-generator

ActiveLibrary

dev-lancer/jpk-generator
========================

PHP library for generating JPK XML documents

v1.0.3(8mo ago)0481↑200%MITPHPPHP ^8.0

Since Aug 22Pushed 8mo agoCompare

[ Source](https://github.com/jgniecki/JPKGenerator)[ Packagist](https://packagist.org/packages/dev-lancer/jpk-generator)[ RSS](/packages/dev-lancer-jpk-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (5)Used By (0)

JPKGenerator
============

[](#jpkgenerator)

This repository contains a PHP library. A Docker environment using PHP 8 is included to ease development and testing of future scripts.

Requirements
------------

[](#requirements)

- Docker
- Docker Compose

Usage
-----

[](#usage)

Build the container and start an interactive PHP shell:

```
docker compose run --rm app
```

To run a specific PHP script:

```
docker compose run --rm app /app/your_script.php
```

The working directory `/app` inside the container is mounted from the project root so changes on the host are immediately available in the container.

XML Generation
--------------

[](#xml-generation)

The library contains an `XmlGenerator` class capable of transforming a populated `Document` object into the final JPK XML string. Only fields with non-null values are included in the output and attributes are respected.

```
