I want to convert the XML structure below into a PHP array.
<BillingApplyRq>
<FatoryId>xxxxxx</FatoryId>
<TotalNum>2</TotalNum>
<Records>
<Record>
<ReturnMsgNo>1</ReturnMsgNo>
<ReturnMsg></ReturnMsg>
<TradeSeq>00001</TradeSeq>
</Record>
<Record>
<ReturnMsgNo>1</ReturnMsgNo>
<ReturnMsg></ReturnMsg>
<TradeSeq>00002</TradeSeq>
</Record>
</Records>
</BillingApplyRq>
Does anyone know how to do that?