May 22, 2003

PHP XSLT

WheresMyStuff: php xml

Pretty simple PHP script for doing XSLT:


// store XML and XSL content as variables
$xmlstring = join('', file('person.xml'));
$xslstring = join('', file('person.xsl'));

// call the XSLT processor directly
xslt_process($xslstring, $xmlstring, $result);

// output the result
echo $result;

Posted by Lance at May 22, 2003 02:40 PM
Comments