Page 1 of 1

From XML to MySQL

Posted: Thu Aug 03, 2006 5:21 am
by christian_phpbeginner
Hi, at my place where I work wants that every news produced from the central should be at the news section of the branches' website also.

I was using RSS or XML to retrieve the data and display them in the website, but the problem is, whenever XML was updated from the central, the archive is gone, and the user of our website can't see the archive, unless they should go to the main server in the central. But the central department doesn't want much traffic. What I mean with the archive is, when our user wants to view the news which was last week...they can't find one in our website.

I am a newbie in PHP world...so, which is better do you think of these possibilities ?
1. Load and save the XML files...and store all the XML files into the MYSQL Database...including the nodes ?
2. Retrieve the value of XML , and store only the VALUE from the XML into the MySQL Database, then display it.


Thanks for your reply.

Chris

Posted: Thu Aug 03, 2006 5:34 am
by jmut
well..since you already have the algorithm to parse/view whatever the XML
I would suggest as soon as you get one....you store it in archive somewhere.
And then add possibility to browse this archive.
Where to store the XML really does not metter....it does...but depends on particular oragnization,strucutre whatever......do what is simplest and easiest to maintain.

Posted: Thu Aug 03, 2006 5:51 am
by christian_phpbeginner
jmut wrote:well..since you already have the algorithm to parse/view whatever the XML
I would suggest as soon as you get one....you store it in archive somewhere.
And then add possibility to browse this archive.
Where to store the XML really does not metter....it does...but depends on particular oragnization,strucutre whatever......do what is simplest and easiest to maintain.
Thanks for the reply, but they would like to store the xml in the database as well. So, I think it would be better just to store the value than all the nodes as well. Because, in branches are where the XML files end.