J'ai trouvé :
<?php
header("Content-Type: text/xml");
$xml = '<?xml version="1.0" encoding="utf-8" ?>';
$xml .= '<fichiers>';
$dossier = opendir(".");
while($enCours = readdir($dossier))
{
if ($enCours[0] != "." && $enCours[0] != ".." && !is_dir($enCours) )
{
$xml .= '<fichier>';
$xml .= '<nom>'.$enCours.'</nom>';
$xml .= '</fichier>';
}
}
closedir($dossier);
$xml .= '</fichiers>';
echo $xml;
?>
mais dasn XML c'es présenté comme ceci :
<playlist version="1" xmlns="http://xspf.org/ns/0/">
<trackList>
<track>
<title>toto</title>
<creator>blabla</creator>
<location>http://site/clip/blabla toto.FLV</location>
</track>
</trackList>
</playlist>
possible que le php s'adapte pour ma xml ?