
22/03/2004, 07:00
|
| | Fecha de Ingreso: agosto-2003
Mensajes: 2
Antigüedad: 21 años, 7 meses Puntos: 0 | |
Usar funciones XSLT con PHP 4.3.4 Hola amigos!
Estoy intentando usar con php las funciones xslt_create()...etc, necesarias para crear un script que pondré después de estas líneas. Uso la versión 4.3.4 de php, pero no me reconoce xslt_create(), ni las demás. ¿es necesario instalar alguna librería para que me reconozca estas funciones?. Muchas gracias!
/* Código a utilizar*/
<?php
// Allocate a new XSLT processor
$xh = xslt_create();
// Process the document, returning the result into the $result variable
$result = xslt_process($xh, 'sample.xml', 'sample.xsl');
if ($result) {
print "SUCCESS, sample.xml was transformed by sample.xsl into the \$result";
print " variable, the \$result variable has the following contents\n<br>\n";
print "<pre>\n";
print $result;
print "</pre>\n";
}
else {
print "Sorry, sample.xml could not be transformed by sample.xsl into";
print " the \$result variable the reason is that " . xslt_error($xh) .
print " and the error code is " . xslt_errno($xh);
}
xslt_free($xh);
?> |