A vendor is going to be sending me some xml via an httppost to a script I am going to make. The script, when receives the httppost I need to somehow get the data from the xml and put it into my data-base.
I do have experience with all 3, PHP MYSQL and XML. I do know how to get values from XML using E4X but I do not know how to get values from XML using PHP (4.3.9).
so say the httppost is XML that looks like this:
<data>
<item sku="434322" price="15.00" color="blue" shape="round"/>
<item sku="434323" price="20.00" color="red" shape="square"/>
<item sku="434324" price="45.00" color="green" shape="triangle"/>
<item sku="434325" price="30.00" color="blue" shape="star"/>
</data>
How can I use PHP to loop through each node and get each attribute value?
Thanks!!
EDIT: It seems like getting the data from the XML is way complicated so if there is an easier way using something like CSV instead of XML please share that. The vendor did say they could send CSV or whatever format I want.