php xsltprocessor,XSLTProcessor类(xsl数据)

此扩展需要 libxml PHP 扩展。这表示需要使用 --enable-libxml ,尽管这将隐式完成因为 libxml 是缺省开启的。

安装

PHP 5默认包含XSL扩展,可以通过将参数XSL[=DIR]添加到配置行(DIR是libxslt安装目录)来启用。

XSLTProcessor类

(PHP 5, PHP 7)XSLTProcessor

{

/* 方法 */

getParameter ( string $namespaceURI , string $localName ) : string

public getSecurityPrefs ( void ) : int

hasExsltSupport ( void ) : bool

public importStylesheet ( object $stylesheet ) : bool

registerPHPFunctions ([ mixed $restrict ] ) : void

removeParameter ( string $namespaceURI , string $localName ) : bool

setParameter ( string $namespace , string $name , string $value ) : bool

setProfiling ( string $filename ) : bool

public setSecurityPrefs ( int $securityPrefs ) : int

transformToDoc ( DOMNode $doc ) : DOMDocument

transformToURI ( DOMDocument $doc , string $uri ) : int

transformToXml ( object $doc ) : string

}

例子

本参考中的许多示例都需要XML和XSL文件。我们将使用collection.xml和collection.xsl,其中包含以下内容:

Fight for your mind

Ben Harper

1995

Electric Ladyland

Jimi Hendrix

1997

Hey! Welcome to 's sweet CD collection!

by -


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值