Newsletter-Gesamtinhaltsverzeichnis

Bitte warten. Sortierung läuft…

‚;

$xmlDoc = new DOMDocument(‚1.0‘, ‚UTF-8‘);
$xmlDoc->load($xmlFile);
$xmlDoc->preserveWhiteSpace = FALSE;

$root = $xmlDoc->documentElement;

$temp = $root->childNodes;
$years = array();
$length = $temp->length;
for ($i = 0; $i < $length; ++$i) { $years[] = $temp->item($i);
}

$years = array_reverse($years);

foreach ($years as $item) {
if($item->nodeName != „#text“) {

$temp = $item->childNodes;
$issues = array();
$length = $temp->length;
for ($i = 0; $i < $length; ++$i) { $issues[] = $temp->item($i);
}

$issues = array_reverse($issues);

foreach($issues as $issue) {
if($issue->nodeName != „#text“) {
if($issue->hasAttributes()) {
foreach ( $issue->attributes as $attribute ) {
if($attribute->name == „title“) {
$ausgabe=$attribute->value;
$a = explode(“ „,$ausgabe);
if(count($a) > 1) {
$ausgabe = $a[0];
}

foreach($issue->childNodes as $topic) {
if($topic->nodeName != „#text“) {
if($topic->hasAttributes()) {
$title = $topic->attributes->getNamedItem(„topic_Heading“)->nodeValue;
$link = ‚‚ .$ausgabe. ‚

‚;
$tablebody .= ‚

‚;
$tablebody .= ‚

‚;
}
}
}
}
}
}

}
}
}
}
}

$footer = ‚

Titel Rubrik Ausgabe Im Archiv anzeigen
‚ . $link . ‚

‚;

$ofile = fopen($outputfile, „w“);
fputs($ofile, $header);
fputs($ofile, $tablebody);
fputs($ofile, $footer);
fclose($ofile);
}

echo file_get_contents($outputfile);
?>