diff --git a/Zweites Jahr/aufgaben/csvToXml/convertCSVtoXML.php b/Zweites Jahr/aufgaben/csvToXml/convertCSVtoXML.php index 6f78c55..4222c16 100644 --- a/Zweites Jahr/aufgaben/csvToXml/convertCSVtoXML.php +++ b/Zweites Jahr/aufgaben/csvToXml/convertCSVtoXML.php @@ -27,8 +27,6 @@ if(!$fp){ $header_array =fgetcsv($fp, 0, ";"); -print_r($header_array); - // CREATE XML DOM $xmlDoc = new DOMDocument("1.0", "utf-8"); $xmlDoc->formatOutput=true; @@ -55,7 +53,6 @@ while(($row_array = fgetcsv($fp, 0, ";")) !== false){ // get current collumn $column = $header_array[$i]; - echo "$row_array[$i]
"; // create a new element with name of column and row data $xmlSchuelerDaten = $xmlDoc->createElement($column, $row_array[$i]); @@ -66,5 +63,7 @@ while(($row_array = fgetcsv($fp, 0, ";")) !== false){ } // Save whole XML file -$fileXml = "e2fi2.xml"; -$xmlDoc->save(__DIR__ . "/$fileXml"); \ No newline at end of file +$fileXML = "e2fi2.xml"; +$xmlDoc->save(__DIR__ . "/$fileXML"); + +echo "CSV FILE ($fileCSV) CONVERTED TO XML ($fileXML) AND SAVED"; \ No newline at end of file