diff options
Diffstat (limited to 'examples/xml.php')
-rw-r--r-- | examples/xml.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/xml.php b/examples/xml.php new file mode 100644 index 0000000..650c453 --- /dev/null +++ b/examples/xml.php @@ -0,0 +1,16 @@ +<?php + +error_reporting(-1); +ini_set('display_errors', 1); + +use Bakame\Csv\Reader; + +require '../vendor/autoload.php'; + +$inputCsv = new Reader('data/prenoms.csv'); +$inputCsv->setEncoding('ISO-8859-15'); +$inputCsv->setDelimiter(';'); +$xml = $inputCsv->toXML('csv', 'ligne', 'cellule'); +header('Content-Type: application/xml; charset="utf-8"'); +header('Content-Length: '.strlen($xml)); +die($xml); |