note 37981 modified in ref.com by danbrown
| From: | danbrown@php.net | Date: | Mon, 21 Dec 2009 17:12:53 +0000 |
| Subject: | note 37981 modified in ref.com by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-164220@lists.php.net to get a copy of this message | ||
XSLT transformations using MSXML can be done with this code
<?php
function xsltransform1($xslpath,$xmlstring)
{
$xml= new COM("Microsoft.XMLDOM");
$xml->async=false;
// $xmlstring is an xml string
$xml->load($xmlstring);
$xsl = new COM("Microsoft.XMLDOM");
$xsl->async=false;
// $xslpath is path to an xsl file
$xsl->load($xslpath);
$response=$xml->transformNode($xsl);
unset($xml);
unset($xsl);
return $response;
}
?>
enjoy
Alan Young
--was--
XSLT transformations using MSXML can be done with this code
function xsltransform1($xslpath,$xmlstring)
{
$xml= new COM("Microsoft.XMLDOM");
$xml->async=false;
// $xmlstring is an xml string
$xml->load($xmlstring);
$xsl = new COM("Microsoft.XMLDOM");
$xsl->async=false;
// $xslpath is path to an xsl file
$xsl->load($xslpath);
$response=$xml->transformNode($xsl);
unset($xml);
unset($xsl);
return $response;
}
// enjoy
//Alan Young
http://php.net/manual/en/ref.com.php