preserveWhiteSpace = false; $xmlDoc->formatOutput = true; # $xmlDoc->encoding = 'utf-8'; $xmlMainElem = $xmlDoc->createElement("record"); $record_node = $xmlDoc->appendChild($xmlMainElem); //add record element to XML node # $rss_node->setAttribute("version", "2.0"); //set RSS version $lineCount = count($zeile); for ($x = 0; $x < $lineCount; $x++) { $inhalt[$y][$x] = $zeile[$x]; if ($inhalt[$y][$x] == '') $inhalt[$y][$x] = 'ERSATZ'; $record_node->appendChild(createTextDomElement($xmlDoc, trim($inhalt[1][$x]), trim($inhalt[$y][$x]))); # $somecontent = $somecontent . '<' . tagify(transform($inhalt[1][$x])) . '>' . (($inhalt[$y][$x])) . '' . "\n"; //für ungarn sonst weg ////////////////////////////////////////////////////////////// } $somecontent = '' . $xmlDoc->saveXML($xmlDoc->documentElement); # $somecontent .= ''; //if ($y>1) //{ if (fwrite($handle, $somecontent) === FALSE) { echo "Cannot write to file ($filename)";exit; } fclose($handle); } fclose($fp); echo printHTMLHead(); echo '
' . ($y - 1) . ' files created

Download as ZIP
';