php 对xml 节点的访问

<Result>
<TS>1289963927</TS>
<RetCode>123</RetCode>
<TotalHits>12</TotalHits>
−
<Gifts>
−
<Gift>
<GiftID>1</GiftID>
<GiftName>abc</GiftName>
</Gift>
</Gifts>
</Result>

 

$result=$xml->Gifts->Gift;
$result=$xml->TS;

 

不用写Result

你可能感兴趣的:(PHP,xml)