Tutorial :Are there other languages similar in purpose to XML?


I ask this because i find XML to be visually unappealing. I understand that XML is extremely famous, useful, and that it is accepted by most, if not all, programmers as a very useful language for defining and structuring data; however, i really do not find staring at it, looking at it, or reading it very appealing. I'm just a student and I am quite certain i'm going to have to deal with it sooner or later, but i was just wondering if there are alternatives to XML.


Take a look at YAML, or JSON.

There's also a pretty nice Wikipedia article for a Comparison of data serialization formats.


YAML if you like Python.


S-expressions! For parentheses-y goodness!


XML is not very appealing to look at, but there are plenty of XML Editors that make it easier/"better" to look at. I use oXygen, but there's XML Spy and also Visual Studio. They make it easier to work with XML. Technically speaking, XML is not a Language per se, its a format. You can also use XSL to transform it to HTML if you need to view the XML in certain ways.


Ah, since someone mentioned ASN-1 here's two more binary or hard to read encodings:

  • Google's protobuf. It's the data format used by google servers. Yes, every time you google something you trigger hundreds of protobuf padkets to be sent within Google.

  • Bittorrent's bencoding. It's the data format of .torrent files.


There is a very promising new technology called "text"...


Comma-separated values, AKA CSV :) For tabular data, beats XML any day. And very human-readable, too.


You can use S-expressions. It is a very simple language which allows you to do whatever you'd like with it. It is also easy to parse.


And, to round the list off, for binary hideousness, ASN-1. But, this one has the advantage of being extremely compact in some encodings.


In addition to the ones already mentioned the following may be of interest, depending on your domain:

  • HDF5

  • FITS

  • Harwell-Boeing

If you have specific interests there is probably an existing specific file format or several to choose from. On the other hand XML is very widespread and there are good reasons for that.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »