ciao ragazzi,
sto cercando di capire come poter lavorare su file xml. Finora sono riuscito a creare un file xml da zero i DOM.
Dopo averlo creato, ho provato a modificarlo, quindi ho cercato un po' per vedere comee si fà ed ho trovato il seguente metodo:
domxml_open_file("nomefile.xml");
il problema è che mi restituisce il seguente errore:
Fatal error: Call to undefined function domxml_open_file() ...............
questo codice che vi posto l'ho trovato in un forum, ho provato a sostituirlo al mio ma anche questo mi da errore
in questo caso l'errore è:
Fatal error: Call to undefined function domxml_open_mem() ...............
Codice PHP:
$indent = "";
$file = "test.xml";
$showfile = file_get_contents("/var/www/prog/" . $file); // whatever path
// maybe the whole path is not important, look it up in other posts
$newstring=utf8_encode($showfile); // it's important!
if(!$domDocument = domxml_open_mem($newstring)) {
echo "Couldn't load xml...";
exit; }
da cosa dipende?
Grazie