How do I parse XML in PHP?

  • Thread starter Thread starter Craigus
  • Start date Start date
C

Craigus

Guest
I know how to parse an XML file in PHP but in my case I am receiving the following as a variable:
<customer>
<customer Activity="1" xmlns="">
<Client Firstname="John" Lastname="Smith"/>
</customer>
</customer>

I have a function in PHP "newCustomer($data)" the XML above is sent from another website using this function so $data becomes the XML.

How do I parse this information?
 
Back
Top