diff options
author | Ignace Nyamagana Butera <nyamsprod@gmail.com> | 2014-02-17 14:13:25 +0100 |
---|---|---|
committer | Ignace Nyamagana Butera <nyamsprod@gmail.com> | 2014-02-17 14:32:20 +0100 |
commit | b329f401223e32e5b527ca6632ad003bbe234929 (patch) | |
tree | 575494ebaa060f02b4ca7afa9390185504c0efd6 /examples/xml.php | |
parent | 51bbbd9d7638c680256a087d2b932fd51347611d (diff) | |
download | csv-b329f401223e32e5b527ca6632ad003bbe234929.zip csv-b329f401223e32e5b527ca6632ad003bbe234929.tar.gz csv-b329f401223e32e5b527ca6632ad003bbe234929.tar.bz2 |
Documentation Update: adding toXML documentation and a merge example
Diffstat (limited to 'examples/xml.php')
-rw-r--r-- | examples/xml.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/xml.php b/examples/xml.php index 650c453..82052cb 100644 --- a/examples/xml.php +++ b/examples/xml.php @@ -10,7 +10,8 @@ require '../vendor/autoload.php'; $inputCsv = new Reader('data/prenoms.csv'); $inputCsv->setEncoding('ISO-8859-15'); $inputCsv->setDelimiter(';'); -$xml = $inputCsv->toXML('csv', 'ligne', 'cellule'); +$doc = $inputCsv->toXML('csv', 'ligne', 'cellule'); +$xml = $doc->saveXML(); header('Content-Type: application/xml; charset="utf-8"'); header('Content-Length: '.strlen($xml)); die($xml); |