From XML to MySQL

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
christian_phpbeginner
Forum Contributor
Posts: 136
Joined: Sat Jun 03, 2006 2:43 pm
Location: Java

From XML to MySQL

Post 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
jmut
Forum Regular
Posts: 945
Joined: Tue Jul 05, 2005 3:54 am
Location: Sofia, Bulgaria
Contact:

Post 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.
User avatar
christian_phpbeginner
Forum Contributor
Posts: 136
Joined: Sat Jun 03, 2006 2:43 pm
Location: Java

Post 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.
Post Reply