This article is going to explain what are XML and JSON, what are the differences between them, what are the advantages and disadvanates of each of them, and which data format is best to be used in the cas when we are talking about livescore data supply.

What is XML?
XML or Extensible Markup Language is a language, defining rules of document structure. It consists of nodes with specific attribute names and values. XML is widely used for data supply in both RSS feeds and paid XML feeds. It is the most popular format for represnting data in a way, readable for people and machines. Currently all livescore feed and other kinds of sports data providers are using XML in their sport data feeds. You can read more about XML on Wikipedia and W3schools.

What is JSON?
JSON or JavaScript Object Notation is a format of representing data, which can be read by different languages such as PHP and Javascript. JSON can represent as objects arrays in a way in which they can be parsed by different languages. This is very useful in the usage of AJAX nowadays, especially for sport websites. Livescores contain pages which need to be refreshed every minute or even on a smaller interval. A solution for this is a cronjob PHP script, extracting the results from the database and generating them in a JSON file, which is parsed by the client-side Javascript via AJAX request and the refreshed scores are displayed on the page without refresh. Actually the same trick can be done with XML as Javascript can parse XML as well, but XML's sise is significantly bigger than the Javascripts one and when we are talking for updating page with live scores it is vital to optimise speed and performance, therefore use JSON. More information about JSON is available on Wikipedia.

What are the advantages and disadvantages of XML and JSON?

XML advantages and disadvantages
Main advantage of XML are that XML is human-readable, and main disadvantages over JSON is that it is bigger in size and it is consuming much more computer resourses to be parsed into database.

JSON advantages and disadvantages
Main disadvantage of JSON are that JSON is not human-readable or at least not as easy as XML is, and main advantages over JSON is that it is smaller in size and it is consuming significantly less computer resourses when being parsed into database.

This video is also comparing XML and JSON, stating that JSON is the better format:

What format should be used when we are talking about livescore feed or any other live sports data feed?

As we already mentioned, JSON is consuming less bandwith and is processed in a much faster way than XML by the computer scripts. On the other hand, XML is easier for reading by people. So, what we suggest to everybody, who is going to buy a paid xml scores service is to look at the data first during the free trial period in a XML format. In that way he will be able to easily and celarly see if he is satisfied with the speed and content of the sports data feed. XML is also better for usage while the live sport feed is being implemented in the application, for the same reason - easier human reading of its data and easier debugging. But once things are set up and everything is going to work on a cronjob basis, thus, when we are talking for the period in which the sport website development is finsihed and the data needs to be updated live on the website or application, things are a little but different. Now we do not need to look at the XML because we already have the data from it extracted in our database and we can check the data content directly on our applicatoin. On the other hand, we want our livescore or sports data application to be updated as fast as possible. In order to get this done we need to optimise server bandwith and processor time usage. This can be done by using the JSON format and that is what we suggest - JSON format is better for supplying data which needs to be updated live and fast, as it is in the case when we are talking about sports data application.

How to achieve this? How to get live XML scores service, which can represent the data in both JSON and XML format?
Despite the majority of livescore feed providers, is offering its sports data feeds in both JSON and XML formats, which can be smartly switched by changing the value of a single GET parameter. Except that only our feeds has unique system for including different segments of data in the XML sheets by manipulating the URL GET parameters. We will be pleased to show you the quality of our XML scores services, so do not hesitate to contact us and get your free trial right now!

contact us

  • soccer football live score xml data feed
  • basketball live score xml data feed
  • tennis live score xml data feed
  • ice hockey live score xml data feed
  • american football live score xml data feed
  • handball live score xml data feed