Bir satıcı Ben yapmak için gidiyorum bir komut dosyası için bir HttpPost yoluyla bana bazı xml gönderme olacak. Script, ne zaman ben bir şekilde xml den veri almak ve benim veri tabanı içine koymak gerekir HttpPost alır.
Ben her 3 deneyimi, PHP MYSQL ve XML var. Ben E4X'i kullanarak XML değerleri almak için nasıl biliyorum ama ben PHP (4.3.9) kullanarak XML değerleri almak için nasıl bilmiyorum.
böylece HttpPost bu gibi görünüyor XML olduğunu söylüyorlar:
<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>
Nasıl her düğüm döngü PHP kullanmak ve her öznitelik değeri alabilirim?
Teşekkürler!
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.