使用時需要載入XSLT模組,程式下載地址:http://xiaocon.51.net/tree/tree.zip
示範地址:
http://xiaocon.51.net/tree/tree.htm
" target=_blank>
http://xiaocon.51.net/tree/tree.htm
或
http://xiaocon.51.net/tree/navi.xml
" target=_blank>
http://xiaocon.51.net/tree/navi.xml
51.net上不支援xslt :(
程式檔案:
===========================================================
$xslstring = implode(',file("navigator.xsl"));
$xmlstring = implode(',file("navi.xml"));
$arguments = array(
'/_xml' => $xmlstring,
'/_xsl' => $xslstring
);
$xh = xslt_create();
$result = xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments);
if ($result) {
print $result;
}
else {
print "Err";
}
xslt_free($xh);
?>
xml檔案
===========================================================
XSLT檔案
============================================================
XSLT樹形導覽列
Navigator-Hidden
no
有座花園分類目錄 |
padding-left:em; toggle('') toggle('') |