You book a bus ticket on your phone. Chattogram to Cox's Bazar, Saturday morning, seats B1 and B2, Tk 1,720.50, paid. In the second after you tap "Pay", at least three programs have to agree on what you just did. The app in your hand was written for phones. The server that keeps the seat chart is written in another language and sits in a data centre somewhere. The payment service belongs to a different company, whose programmers have never met the bus company's programmers.
These programs share no memory, and none of them can reach into another one's variables. All they can do is send each other text, so somebody has to decide what that text looks like. Where does the passenger's name end and the phone number begin? Is 1720.50 a number or a word? What if the note says "Window seat & extra luggage", with an ampersand in it?
Two answers to this question have won, and you meet them everywhere. XML was published in 1998 and still carries SOAP messages, sitemaps, news feeds and office files. JSON came a few years later, took over web APIs, and is the format your phone app almost certainly used a moment ago. The exams ask about both: which one is the lightweight message format (one question, asked in four bank papers), what an XSLT processor does, and what separates a well-formed document from a valid one.
By the end of this chapter you will write the booking above in both formats, and look at a broken XML file and say what is wrong and why a parser refuses it. You will say what separates well-formed from valid, write a DTD and an XML Schema, and use namespaces to keep two vocabularies apart.