我想用 xpath 返回一个对象内的参数值。
示例代码:
<object id="player" width="100%" height="100%" type="application/x-shockwave-flash" data="http://merhad.333low.com/player.swf" bgcolor="#000000" name="player" tabindex="0">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="seamlesstabbing" value="true">
<param name="wmode" value="opaque">
<param name="flashvars" value="http://merhad.333low.com/fqoyJxxS-2c2MSx-wGYmS3T1pkggIeiK7wpA7BbXXcK2sC4XYWehpBDV6CAK7CFH/s=awcmxqt5gYntLqHJ9ceP.flv">
</object>
我试过这个,但没有结果!示例代码:
echo $xpath2->query("//object[id='player']/param/@value")->item(0)->nodeValue;