<info
money="5000"
fen="100"
flv="001.flv"
url="post.php"<times>
<![CDATA[
0,pause
42.4451895,start
65.5147473,0红色兔子15[2]
113.0223309,start
136.1858112,0绿色狮子25
185.24918,start
208.4214522,0黄色熊猫9
]]>
</times>
</info> 我需要得到info 中money、fen、flv .... 每个的属性值。 求助各位高手大大了, 急在线等!!
money="5000"
fen="100"
flv="001.flv"
url="post.php"<times>
<![CDATA[
0,pause
42.4451895,start
65.5147473,0红色兔子15[2]
113.0223309,start
136.1858112,0绿色狮子25
185.24918,start
208.4214522,0黄色熊猫9
]]>
</times>
</info> 我需要得到info 中money、fen、flv .... 每个的属性值。 求助各位高手大大了, 急在线等!!
money="5000"
fen="100"
flv="001.flv"
url="post.php">
<times>
<![CDATA[
0,pause
42.4451895,start
65.5147473,0红色兔子15[2]
113.0223309,start
136.1858112,0绿色狮子25
185.24918,start
208.4214522,0黄色熊猫9
]]>
</times>
</info>应该是这个样子的, 在url="post.php" 后面丢了个 “>” .
$xml=<<<XML
<info
money="5000"
fen="100"
flv="001.flv"
url="post.php">
<times>
<![CDATA[
0,pause
42.4451895,start
65.5147473,0红色兔子15[2]
113.0223309,start
136.1858112,0绿色狮子25
185.24918,start
208.4214522,0黄色熊猫9
]]>
</times>
</info>
XML;$xml = new SimpleXMLElement($xml);$abc = $xml->attributes()->url;echo $abc;?>utf-8