0
我有這個xml內容。我需要從fullName屬性中獲取值。我已經嘗試過使用lib.xml解析器。但它不起作用。你能幫我實現嗎?提前致謝。使用PHP的XML解析器
<?xml version="1.0" encoding="UTF-8"?><currentUserDetails firstName="3rdParty" fullName="3rdParty Access" lastName="Access" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="" xmlns=""/>
當我的$ XML [ '全名']分配給會話變量 \t $ _SESSION [「fullusername 「] = $ xml ['fullName']; 它顯示爲 \t [fullusername] => SimpleXMLElement對象 ( [0] =>的3rdParty訪問 ) – user2118463 2013-04-26 11:07:14
@ user2118463:投給字符串:'$測試=(字符串)$ XML [ '全名'];' – michi 2013-04-26 16:23:18