Jurik: Mit PHP einen XML Code erzeugen und an JS senden

Beitrag lesen

Hab soeben eine nette und so logische Lösung gefunden:

PHP-File:
<?php
$xml = '<?xml version="1.0" encoding="UTF-8"?>
<links>
 <link id="1">
    <text>Mozilla</text>
    <url>http://www.mozilla.com/</url>
 </link>
 <link id="2">
    <text>Microsoft</text>
    <url>http://www.microsoft.com/</url>
 </link>
 <link id="1">
    <text>Opera</text>
    <url>http://www.opera.com/</url>
 </link>
</links>';

header('Content-type: text/xml');
echo $xml;
?>

Hier kommts auf die vorletzte Zeile an :D