openstamanager/plugins/importFE/view.php

23 lines
456 B
PHP
Raw Normal View History

2019-02-12 11:42:48 +01:00
<?php
include_once __DIR__.'/../../core.php';
$directory = Plugins\ImportFE\FatturaElettronica::getImportDirectory();
$filename = get('filename');
$content = file_get_contents($directory.'/'.$filename);
// XML
$xml = new DOMDocument();
$xml->loadXML($content);
// XSL
$xsl = new DOMDocument();
2019-02-20 16:07:42 +01:00
$xsl->load(DOCROOT.'/plugins/xml/asso-invoice.xsl');
2019-02-12 11:42:48 +01:00
// XSLT
$xslt = new XSLTProcessor();
$xslt->importStylesheet($xsl);
echo $xslt->transformToXML($xml);