How to show the element from XML (SAXParser) to table?

What method is best to use country table in mysql, php? JSON, xml or mysql table?

  • i am using country table in mysql using php? which is the best method ?   xml or JSON or mysql table JSON: eg json.php $country = array('1'=>'india','2'=>'us'); xml:       <xml>         <countries>               <country id="1">india</country>                <country id="2">us</country>        </countries> MYSQL:           country_id            1            2           country_name      india      us

  • Answer:

    I would use a cached xml file, but that is strictly a matter of my own personal preference. All are equally valid. From a performance perspective I suspect that MySQL would probably be a little slower than the others. I'm not sure how JSON and xml compare as far as speed of loading, but they are close enough that I've never noticed a difference.

Jim Barrett at Quora Visit the source

Was this solution helpful to you?

Other answers

There are 34 new countries in the world since 1990, so the chance of the countries list being updated often is fairly low. With that in mind I would incline on having a JSON string cached somewhere on the server and decoded in the boot part of the application.

Robert Doroftei

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.