What happens when we need to transmit data between two machines?
When we want to transmit data between two machines, store configuration data or save for later use, we must decide what type of file format we will use for that. For this purpose there are predefined formats; some of the most popular formats are XML, JSON and YALM. These formats often provide libraries for creation and / or use of the files.
- It is an extensible (eXtensible Markup Language) format. But it’s more than a format: it is a language.
- It has a well defined structure could be checked by DTD or Schema.
- It has a lot associated tools (CSS, DTD, XPath, Schema, …).
- Processed by the management of the entire tree (DOM) or as lee (SAX). DOM allows more power at the expense of resources and SAX provides higher speed and lower power consumption.
- Used in complex communication systems such as SOAP or Web Services.
- It is a lightweight format for data exchange. Allows serialize almost any object.
- It is a string representation of a combination of hashes, vectors and key-value pair format.
- It has been standardized as a method of communication between methods of the same application, as part between Java and JSP from a servlet.
- It is very suitable and simple for small structures but will tend to complicate quickly. For a small set of data is very intuitive, however the simplicity tends to diminish when data will increase.
- Gossip! There are a lot of information about that Twitter has removed support for XML within his API and Foursquare’s API v2 only supports JSON.
- It can be considered the most lightweight markup language: it has a simple, easy syntax by developing human with a plain text editor
- It is especially useful to create configuration files.
- It’s not as language agnostic as XML.