Php 将SimplePie与自定义元素一起使用?

Php 将SimplePie与自定义元素一起使用?,php,xml,simplepie,Php,Xml,Simplepie,我有一个这样的示例提要 示例XML <ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <ROOM id="20" maxplayers="0" currentplayers="0" cm="" status="1" seconds="196" progressive="19.48" name="Tuppence Treats" cardvalue="0.02" jackpot="50.00" opentimes=

我有一个这样的示例提要

示例XML

<ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql">
    <ROOM id="20" maxplayers="0" currentplayers="0" cm="" status="1" seconds="196" progressive="19.48" name="Tuppence Treats" cardvalue="0.02" jackpot="50.00" opentimes="2pm" roomtype="90" ticketGraphic="" lastWinner="" cardType="3"/>
    <ROOM id="39" maxplayers="0" currentplayers="0" cm="" status="1" seconds="1996" progressive="19.48" name="Fancy Free" cardvalue="0.00" jackpot="10.00" opentimes="Midday" roomtype="90" ticketGraphic="" lastWinner="" cardType="3"/>
</ROOT>


如何访问每个房间的属性,如MaxPlayer、lastWinner等?

您可以使用PHP中的SimpleXml库(http://es.php.net/simplexml). 有很多这样的库用于解析xml文档