eseguendo questo:
<?php
$oggettoDom = domxml_open_file("database.xml");
$nodo = xpath_eval(xpath_new_context($oggettoDom),"//INFO[@id = 2]");
$xh = xslt_create();
// Processo il documento
$result = xslt_process($xh, $nodo , 'xsl/palmare/stilefinale.xsl' ); {
print $result;
}
xslt_free($xh);
function getFileContent($xslt = null)
{
$filename = '/xslt/'.$xslt;
ob_start();
readfile($filename);
$result = ob_get_contents();
ob_end_clean();
return $result;
}
$nodoStringa = $nodo->dump_mem(true, 'UTF-8');
$xslt = getFileContent($xslt);
$arguments = array('/_xml' => $nodoStringa, '/_xslt'=>$xslt);
$trans = xslt_create();
$return = xslt_process($trans, 'arg:/_xml','arg:/_xslt', null, $arguments);
xslt_free($trans);
echo $return;
?>
mi dà questo errore...
Notice: Object to string conversion in c:\programmi\easyphp1-7\www\index.php on line 7
Warning: Sablotron error on line 56: cannot open file 'c:/programmi/easyphp1-7/apache/Object' in c:\programmi\easyphp1-7\www\index.php on line 7
Fatal error: Call to undefined function: dump_mem() in c:\programmi\easyphp1-7\www\index.php on line 23