Solved

xml to full database website

Posted on 2011-03-21
1
180 Views
Last Modified: 2012-05-11
Hi,

I recently got a hold on some xml files which contains alot of information on items from a game.
Now for the moment that file is about 240mb big :D Now I found out that there are quite alot of information that can just be deleted to bring it down to 20mb... But anyways.

Now there are a few questions I would like to ask you experts:

After opening it in FireFox it says there UTF-8 invalid characters. Is there an easy way using an editor to remove/replace them?

Should I keep this xml as it is and cache the retrieved info? Or set everything in a database (mysql)? If so what's the easiest way of transfering the data?
Connected to this question: I would like my users to use a bbcode and enter the desired name (exact name) of an item which makes it possible for them to auto generate an image with the info as a hover-tooltip. Should I keep an eye on server overload issues? Also can this be done with a simple "for each item with name -> show"?

Has anyone maybe made this before? Or are there any resources online I could use?

Kind regards
0
Comment
Question by:Mutsop
1 Comment
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 35181798
there UTF-8 invalid characters  
Often this happens if there are Western European characters single-byte characters with values above decimal 127, but the encoding says, "UTF-8."  Often you can correct this by simply omitting the encoding or specifying ISO-8859-1, etc.  More information here:
http://www.joelonsoftware.com/articles/Unicode.html

keep this xml ... set everything in a database
You might do either or both.  It depends on what you want to do with the data.  XML is hierarchical, MySQL is relational.  If you're doing lookups on 240MB you might want the speed of a normalized and well-indexed data base.  It is data-dependent, and you would probably want to get a professional DBA involved in the project.  You will expect questions like, "where does the data come from?" and "how often is it updated or replaced?"

anyone maybe made this before?
Almost certainly - make a Google search for XML-to-MySQL and you will surely find something useful.  I have seem many projects where ignorant data architects have declared that they would stop using XML or data bases and start using only data bases or only XML.  None of these projects made much sense.  XML and MySQL are not fungible.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now