Hola amigos, tengo un script php que "parasea" un XML, el script esta aquí:
http://keithdevens.com/software/phpxml yo lo tengo en la version 1.2b.
Yo estoy haciendo este script:
Código PHP:
//Arxius
require('includes/inc.xml.php');
$file = 'rss.xml';
$xml = file_get_contents($file);
//Dades
$data = XML_unserialize($xml);
$web_title = $data['rss']['channel']['title'];
$web_link = $data['rss']['channel']['link'];
$web_copyright = $data['rss']['channel']['copyright'];
$item_title = $data['rss']['channel']['item']['title'];
// Mostrar
echo '<div class="titol">'.$web_title.'</div>';
echo '<div class="enllaç_pres"><a href="'.$web_link.'">'.$web_link.'</a></div>';
echo '<div class="by">by: '.$web_copyright.'</div>';
echo '<div class="titol">'.$item_title.'</div>';]
Pero yo cuando quiero mostrar el $item_title, de RSS, no me lo muestra. Supongo que es porqu hay varios. ¿Sabeis cómo puedo hacer para diferenciar uno o otro, o cómo mostrarlos todos?