Home > php教程 > php手册 > 我也贴一个,用的时候只要配制好xml文件就行了,连程序都不用改

我也贴一个,用的时候只要配制好xml文件就行了,连程序都不用改

WBOY
Release: 2016-06-21 09:07:38
Original
911 people have browsed it

xml|程序

使用时需要加载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文件

============================================================


    
    



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template