| | |
Using and processing XML from multiple sources
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2008
Posts: 3
Reputation:
Solved Threads: 0
Im trying to build a site that gets info, lets say product prices, from different xml sources that have a different structure. Then it displays all the prices sorted..
My first guess is to import all the data from the different XMLs to a mysql db after the sorting of the XMLs, and then display it on the site. However the data will be updating frequently so im looking for a different aproach..
Any thoughts?
Tools i can use?
My first guess is to import all the data from the different XMLs to a mysql db after the sorting of the XMLs, and then display it on the site. However the data will be updating frequently so im looking for a different aproach..
Any thoughts?
Tools i can use?
•
•
Join Date: Aug 2008
Posts: 381
Reputation:
Solved Threads: 33
I made a similar page that gathered prices from different book vendors based on ISBN-AEN numbers. I created a vendor-specific RegEx to retrieve the price values after looking up the book page via GET-query on the address bar. This approach required PERL (at the time), now I would use PHP...and simply build the results page on-the-fly before sending it off from the server to the client-browser.
So if I had to do the same thing but gathering the price values from XML I would probably still grab the latest values on-the-fly and definitely use PHP's built in XML parsing functions to make this pretty easy.
1. Client Request for product
2. PHP grab XML and extract values from same
3. Build results page & publish to client
Hope this helps.
So if I had to do the same thing but gathering the price values from XML I would probably still grab the latest values on-the-fly and definitely use PHP's built in XML parsing functions to make this pretty easy.
1. Client Request for product
2. PHP grab XML and extract values from same
3. Build results page & publish to client
Hope this helps.
Last edited by langsor; Mar 3rd, 2009 at 12:11 am.
Google is the answer to all of your questions -- the trick is knowing what question to ask in your specific predicament.
•
•
Join Date: Sep 2008
Posts: 3
Reputation:
Solved Threads: 0
•
•
•
•
I made a similar page that gathered prices from different book vendors based on ISBN-AEN numbers. I created a vendor-specific RegEx to retrieve the price values after looking up the book page via GET-query on the address bar. This approach required PERL (at the time), now I would use PHP...and simply build the results page on-the-fly before sending it off from the server to the client-browser.
So if I had to do the same thing but gathering the price values from XML I would probably still grab the latest values on-the-fly and definitely use PHP's built in XML parsing functions to make this pretty easy.
1. Client Request for product
2. PHP grab XML and extract values from same
3. Build results page & publish to client
Hope this helps.
I initially thought about going this way but I'm pretty sure it would be to slow to function well..
I'm using quite a few xmls so grabbing each one of them realtime on page load sounds a bit tedious and really not efficient server wise.
How did it work for you with the ISBN-AEN numbers? acceptable loading times?
![]() |
Similar Threads
- Cannot find server or DNS Error - please help! (Viruses, Spyware and other Nasties)
- Linux Audio Streaming (live!) using Ices and Icecast (*nix Software)
Other Threads in the PHP Forum
- Previous Thread: simple mysql question..plz answer :)
- Next Thread: send email script
| Thread Tools | Search this Thread |
apache api array beginner binary body broken buttons cakephp checkbox class cms code cron curl database date date/time display dynamic ebooks echo email error file files folder form forms function functions global google href htaccess html image include insert ip javascript joomla limit link list login mail mediawiki menu mlm msqli_multi_query multiple mycodeisbad mysql number oop parameter paypal pdf php phpincludeissue problem query radio random recourse recursion regex remote script search seo server sessions sms source sp space speed sql static subdomain syntax system table tag tutorial update upload url validator variable vbulletin video web webdesign white wordpress xml youtube





