$s =<<< TXT
<row dataType="TR" ID="07A72498325C0B0DE050C7707961FCF8" agentCode="253001001001001" transferId="C81_AGIN3439952663804" tradeNo="141112789497906" platformType="AGIN" playerName="C81AGIN79514" transferType="IN" transferAmount="100" previousAmount="0" currentAmount="100" currency="CNY" exchangeRate="1" IP="0" flag="0" creationTime="2014-11-12 06:08:12" gameCode="" />
<row dataType="TR" ID="07A75AD0A35E1114E050C7707961FF13" agentCode="253001001001001" transferId="C81_AGIN3439952663804" tradeNo="141112789497906" platformType="AGIN" playerName="C81AGIN79514" transferType="IN" transferAmount="100" previousAmount="0" currentAmount="100" currency="CNY" exchangeRate="1" IP="0" flag="0" creationTime="2014-11-12 06:08:12" gameCode="" />
<row dataType="TR" ID="07A72498325D0B0DE050C7707961FCF8" agentCode="253001001001001" transferId="C81_AGIN3439952663804" tradeNo="141112789497906" platformType="AGIN" playerName="C81AGIN79514" transferType="IN" transferAmount="100" previousAmount="0" currentAmount="100" currency="CNY" exchangeRate="1" IP="0" flag="0" creationTime="2014-11-12 06:08:12" gameCode="" />
<row dataType="TR" ID="07A75AD0A3921114E050C7707961FF13" agentCode="253001001001001" transferId="C81_AGIN3439952663804" tradeNo="141112789497906" platformType="AGIN" playerName="C81AGIN79514" transferType="IN" transferAmount="100" previousAmount="0" currentAmount="100" currency="CNY" exchangeRate="1" IP="0" flag="0" creationTime="2014-11-12 06:08:12" gameCode="" />
TXT;$x = simplexml_load_string("<root>$s</root>");
print_r($x);SimpleXMLElement Object
(
[row] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[dataType] => TR
[ID] => 07A72498325C0B0DE050C7707961FCF8
[agentCode] => 253001001001001
[transferId] => C81_AGIN3439952663804
[tradeNo] => 141112789497906
[platformType] => AGIN
[playerName] => C81AGIN79514
[transferType] => IN
[transferAmount] => 100
[previousAmount] => 0
[currentAmount] => 100
[currency] => CNY
[exchangeRate] => 1
[IP] => 0
[flag] => 0
[creationTime] => 2014-11-12 06:08:12
[gameCode] =>
) ) [1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[dataType] => TR
[ID] => 07A75AD0A35E1114E050C7707961FF13
[agentCode] => 253001001001001
[transferId] => C81_AGIN3439952663804
[tradeNo] => 141112789497906
[platformType] => AGIN
[playerName] => C81AGIN79514
[transferType] => IN
[transferAmount] => 100
[previousAmount] => 0
[currentAmount] => 100
[currency] => CNY
[exchangeRate] => 1
[IP] => 0
[flag] => 0
[creationTime] => 2014-11-12 06:08:12
[gameCode] =>
) ) [2] => SimpleXMLElement Object
(
[@attributes] => Array
(
[dataType] => TR
[ID] => 07A72498325D0B0DE050C7707961FCF8
[agentCode] => 253001001001001
[transferId] => C81_AGIN3439952663804
[tradeNo] => 141112789497906
[platformType] => AGIN
[playerName] => C81AGIN79514
[transferType] => IN
[transferAmount] => 100
[previousAmount] => 0
[currentAmount] => 100
[currency] => CNY
[exchangeRate] => 1
[IP] => 0
[flag] => 0
[creationTime] => 2014-11-12 06:08:12
[gameCode] =>
) ) [3] => SimpleXMLElement Object
(
[@attributes] => Array
(
[dataType] => TR
[ID] => 07A75AD0A3921114E050C7707961FF13
[agentCode] => 253001001001001
[transferId] => C81_AGIN3439952663804
[tradeNo] => 141112789497906
[platformType] => AGIN
[playerName] => C81AGIN79514
[transferType] => IN
[transferAmount] => 100
[previousAmount] => 0
[currentAmount] => 100
[currency] => CNY
[exchangeRate] => 1
[IP] => 0
[flag] => 0
[creationTime] => 2014-11-12 06:08:12
[gameCode] =>
) ) ))
<row dataType="TR" ID="07A72498325C0B0DE050C7707961FCF8" agentCode="253001001001001" transferId="C81_AGIN3439952663804" tradeNo="141112789497906" platformType="AGIN" playerName="C81AGIN79514" transferType="IN" transferAmount="100" previousAmount="0" currentAmount="100" currency="CNY" exchangeRate="1" IP="0" flag="0" creationTime="2014-11-12 06:08:12" gameCode="" />
<row dataType="TR" ID="07A75AD0A35E1114E050C7707961FF13" agentCode="253001001001001" transferId="C81_AGIN3439952663804" tradeNo="141112789497906" platformType="AGIN" playerName="C81AGIN79514" transferType="IN" transferAmount="100" previousAmount="0" currentAmount="100" currency="CNY" exchangeRate="1" IP="0" flag="0" creationTime="2014-11-12 06:08:12" gameCode="" />
<row dataType="TR" ID="07A72498325D0B0DE050C7707961FCF8" agentCode="253001001001001" transferId="C81_AGIN3439952663804" tradeNo="141112789497906" platformType="AGIN" playerName="C81AGIN79514" transferType="IN" transferAmount="100" previousAmount="0" currentAmount="100" currency="CNY" exchangeRate="1" IP="0" flag="0" creationTime="2014-11-12 06:08:12" gameCode="" />
<row dataType="TR" ID="07A75AD0A3921114E050C7707961FF13" agentCode="253001001001001" transferId="C81_AGIN3439952663804" tradeNo="141112789497906" platformType="AGIN" playerName="C81AGIN79514" transferType="IN" transferAmount="100" previousAmount="0" currentAmount="100" currency="CNY" exchangeRate="1" IP="0" flag="0" creationTime="2014-11-12 06:08:12" gameCode="" />
TXT;$x = simplexml_load_string("<root>$s</root>");
print_r($x);SimpleXMLElement Object
(
[row] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[dataType] => TR
[ID] => 07A72498325C0B0DE050C7707961FCF8
[agentCode] => 253001001001001
[transferId] => C81_AGIN3439952663804
[tradeNo] => 141112789497906
[platformType] => AGIN
[playerName] => C81AGIN79514
[transferType] => IN
[transferAmount] => 100
[previousAmount] => 0
[currentAmount] => 100
[currency] => CNY
[exchangeRate] => 1
[IP] => 0
[flag] => 0
[creationTime] => 2014-11-12 06:08:12
[gameCode] =>
) ) [1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[dataType] => TR
[ID] => 07A75AD0A35E1114E050C7707961FF13
[agentCode] => 253001001001001
[transferId] => C81_AGIN3439952663804
[tradeNo] => 141112789497906
[platformType] => AGIN
[playerName] => C81AGIN79514
[transferType] => IN
[transferAmount] => 100
[previousAmount] => 0
[currentAmount] => 100
[currency] => CNY
[exchangeRate] => 1
[IP] => 0
[flag] => 0
[creationTime] => 2014-11-12 06:08:12
[gameCode] =>
) ) [2] => SimpleXMLElement Object
(
[@attributes] => Array
(
[dataType] => TR
[ID] => 07A72498325D0B0DE050C7707961FCF8
[agentCode] => 253001001001001
[transferId] => C81_AGIN3439952663804
[tradeNo] => 141112789497906
[platformType] => AGIN
[playerName] => C81AGIN79514
[transferType] => IN
[transferAmount] => 100
[previousAmount] => 0
[currentAmount] => 100
[currency] => CNY
[exchangeRate] => 1
[IP] => 0
[flag] => 0
[creationTime] => 2014-11-12 06:08:12
[gameCode] =>
) ) [3] => SimpleXMLElement Object
(
[@attributes] => Array
(
[dataType] => TR
[ID] => 07A75AD0A3921114E050C7707961FF13
[agentCode] => 253001001001001
[transferId] => C81_AGIN3439952663804
[tradeNo] => 141112789497906
[platformType] => AGIN
[playerName] => C81AGIN79514
[transferType] => IN
[transferAmount] => 100
[previousAmount] => 0
[currentAmount] => 100
[currency] => CNY
[exchangeRate] => 1
[IP] => 0
[flag] => 0
[creationTime] => 2014-11-12 06:08:12
[gameCode] =>
) ) ))
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货