ho letto ma non ho capito molto bene il suo funzionamento.
ho inserito questo codice nella pagina php
Codice PHP:
// Load the XML source
$xml = new DOMDocument;
$xml->load('News.xml');
$xsl = new DOMDocument;
$xsl->load('News.xsl');
// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules
echo $proc->transformToXML($xml);
che è l'esempio numero1
ma testando la pagina in locale mi da questo errore:
Codice PHP:
Fatal error: Class 'XSLTProcessor' not found in D:/Siti Internet/[...]/index2.php on line 292
e on-line quest'altro:
Codice PHP:
Warning: domdocument() expects at least 1 parameter, 0 given in /web/htdocs/[...]/index2.php on line 285
Fatal error: Call to undefined method: domdocument->load() in /web/htdocs/[...]/index2.php on line 286
Non riesco a capire.