php-4.0.6-Win32.zip 至 C:\phpdlls 目錄下四個檔案複製至 C:\Windows\System32(或 System):
expat.dllsablot.dllxmlparser.dllxmltok.dllphp.ini:
extension_dir = c:/php/extensions
;extension=php_sablot.dll → extension=php_sablot.dll
若 PHP 以 CGI 模式運行無需重啟 Web 伺服器,否則需重啟。
<?xml version="1.0"?>
<articles>
<article>This is the first article.</article>
</articles>
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="https://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html><body>
<xsl:value-of select="articles/article"/>
</body></html>
</xsl:template>
</xsl:stylesheet>
<?php
$parser = xslt_create();
xslt_run($parser, 'test.xsl', 'test.xml');
print xslt_fetch_result($parser);
xslt_free($parser);
?>
該解析器不支援 GB2312 編碼。