943,901 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 378
  • PHP RSS
Mar 2nd, 2009
0

Using and processing XML from multiple sources

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bar7b is offline Offline
3 posts
since Sep 2008
Mar 3rd, 2009
0

Re: Using and processing XML from multiple sources

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.
Last edited by langsor; Mar 3rd, 2009 at 12:11 am.
Reputation Points: 30
Solved Threads: 36
Posting Whiz
langsor is offline Offline
389 posts
since Aug 2008
Mar 3rd, 2009
0

Re: Using and processing XML from multiple sources

Click to Expand / Collapse  Quote originally posted by langsor ...
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.
Thanks for your help..
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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
bar7b is offline Offline
3 posts
since Sep 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: simple mysql question..plz answer :)
Next Thread in PHP Forum Timeline: send email script





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC