I have question , how to parsing data from multilevel tag colon XML file with dom PHP. Below is my XML sample data. I want to get data inside < transfer > and return as an array data
<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <HostCustomerResponse xmlns="http://xx.xx.xx.xx">
      <ns1:output xmlns:ns1="http://xx.xx.xx" xmlns:ns2="some:url" xsi:type="ns2:Output">
       <ns2:statusCode>00</ns2:statusCode>
       <ns2:statusMsg/>
       <ns2:txnResponseDateTime>20190625164236</ns2:txnResponseDateTime>
       <ns2:txnData>
         <transferRequest>
           <transfer>
             <transferId>123456789</transferId>
             <txnDate>123456789</txnDate>
             <debitAcctNo>123456789</debitAcctNo>
             <benAcctNo>123456789</benAcctNo>
          </transfer>
        </transferRequest>
      </ns2:txnData>
    </ns1:output>
   </HostCustomerResponse>
  </soapenv:Body>
</soapenv:Envelope>
and this result i want.
array(
  [transferID] => 123456789,
  [txnDate] => 123456789, 
  .....
)
 
     
    