XML generator for ZUGFeRD / Factur-X / XRechnung written in PHP. Convert PHP Objects to XML and back.
The recommended way of installing this library is using Composer.
Add this repository to your composer information using the following command
composer require silarhi/zugferd-factur-x
Convert XML to PHP Objects:
use src\Reader;
$xml = file_get_contents('factur-x.xml');
$obj = Reader::create()->transform($xml);
Convert PHP Objects to XML:
use src\Builder;
$obj = ...;
$xml = Builder::create()->transform($obj);
echo $xml; // Zugferd XML.
Please feel free to send bug reports and pull requests.
Published as open source under the terms of MIT License.