Portable Data
(Excerpt from "XML in a Nutshell" by Elliotte Rusty Harold & W. Scott Means)
XML offers the enticing prospect of truly cross-platform data formats that remain usable for a very long time. For many years, a document created on one platform was not necessarily readable on another platform, in another program on the same platform, or even in a later or earlier version of the same program on the same platform. And being able to read a document does not mean that all the information has survived. Much of the data from the moon landings of the late 1960s and early 1970s has now been lost. Even if you can find a tape drive capable of reading the now obsolete tapes, no one knows the format in which the data on those tapes was stored!
XML is an incredibly simple, well-documented, straightforward data format. XML documents are text, and any tool capable of reading text files can also read XML documents. Not only the XML data itself but also the markup is text, embedded in the XML file as tags. You do not have to wonder why every eighth byte contains random padding, guess whether a four-byte unit is a two’s complement integer or an IEEE 754 floating-point number, or try to decipher which numeric codes correspond to which formatting properties. The tag names tell you directly and precisely what the document is about. And because the tags also define element boundaries, you do not have to contend with unexpected line-ending conventions or guess how many spaces make up a tab. All the important details of a document’s structure are stated explicitly. You do not have to painstakingly reverse-engineer the format or rely on incomplete documentation that is often unavailable in the first place.
Some software vendors still try to lock their users into undocumented, proprietary binary file formats. In the long run, however, we are all better served by the clearly documented, understandable, easy-to-parse, text-based formats that XML provides. XML allows documents and data to be exchanged between different systems with a reasonable expectation that the receiving system can do something useful with them. Validation also allows the receiving system to ensure that it really is getting what it expects. Java promised portable code. XML delivers portable data. In many respects, XML is the most portable and flexible document format since the invention of ASCII.

