Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to make use of an XML file


Guest

Recommended Posts

Posted

Hi All,

 

I have an XML file emailed to me every day containing custom tags from a supplier.

The XML file contains regular updates such as price changes, new products etc.

 

This would be useful to me as the supplier has about 10000 products I could put on the cart,

but I would not otherwise use all of them, too much work. If I could use this XML file then

I would have them all on there - why not!.

 

Anyway, how would approach this, does anyone else have experience in converting and uploading

the data to the database? Do I need to use XSLT or something else ?

 

Cheers

 

Gav...

Posted

Gav, I have a supplier who provides product information and stock level feeds using XML. I just wrote a script that grabs the data using an HTTP call and parses it into a giant array, which I can then dump into the DB as appropriate. Search google for "devens" and "xml class". That's the PHP class I ended up using. Note that I have PHP 4.x which doesn't play well with XML natively; my understanding is that PHP 5.x deals with XML in a much easier fashion. Enjoy :)

 

Max

Posted
Gav, I have a supplier who provides product information and stock level feeds using XML. I just wrote a script that grabs the data using an HTTP call and parses it into a giant array, which I can then dump into the DB as appropriate. Search google for "devens" and "xml class". That's the PHP class I ended up using. Note that I have PHP 4.x which doesn't play well with XML natively; my understanding is that PHP 5.x deals with XML in a much easier fashion. Enjoy :)

 

Max

 

Thanks Max, taking a look now.

 

Don't go too far now....

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...