I want to develop a product feed with my suppliers. This is the XML that the API gives me with the available or exhausted products of this distributor to obtain general information about the product but mainly stock, sku, price ...
<Item>
<PartID>203237</PartID>
<Sku>STCK-11-R8</Sku>
<Desc>Nite Ize Steelie Car Mount Kit</Desc>
<DescExt>
long description... blah blah
</DescExt>
<CategoryID>575</CategoryID>
<CategoryName>NITE IZE STEELIE</CategoryName>
<PhoneMake>UNIVERSAL</PhoneMake>
<PhoneModel>UNIVERSAL</PhoneModel>
<Status>1</Status>
<Cost>17.50</Cost>
<ImageUrl>
http://www.myvoicecomm.com/core_files/uploads/STCK-11-R8.jpg
</ImageUrl>
<ImageFile>STCK-11-R8.jpg</ImageFile>
<OnHand>125</OnHand>
<Upc>094664027312</Upc>
<Ean/>
<Manufacturer/>
<Mpn>STCK-11-R8</Mpn>
<Msrp>34.99</Msrp>
<OptionalImages>STCK-11-R8.jpg,STCK-11-R82.jpg,STCK-11-R83.jpg</OptionalImages>
<EtaDate/>
<ReplacementSku/>
<PreviousSku/>
<FirstReceived>04/18/2013</FirstReceived>
</Item>
I would like to be able to parsed the XML in a hash or array in order to manipulate it and save it in the database. The idea is to synchronize the number of times per day that is eventually defined.
They are around 1000 records, so they go in and out depending on the stock or they are discontinued. That is simply known if they have stock or if it is in zeros.