1.3. Goals of XML

Spurred on by dissatisfaction with the existing standard and non-standard formats, a group of companies and organizations that called itself the World Wide Web Consortium (W3C) began work in the mid-1990s on a markup language that combined the flexibility of SGML with the simplicity of HTML. Their philosophy in creating XML was embodied by several important tenets, which are described in the following sections.

1.3.1. Application-Specific Markup Languages

XML doesn't define any markup elements, but rather tells you how you can make your own. In other words, instead of creating a general-purpose element (say, a paragraph) and hoping it can cover every situation, the designers of XML left this task to you. So, if you want an element called <segmentedlist>, <chapter>, or <rocketship>, that's your prerogative. Make up your own markup language to express your information in the best way possible. Or, if you like, you can use an existing set of tags that someone else has made.

This means there's an unlimited number of markup languages that can exist, and there must be a way to prevent programs from breaking down as they attempt to read them all. Along with the freedom to be creative, there are rules XML expects you to follow. If you write your elements a certain way and obey all the syntax rules, your document is considered well-formed and any XML processor can read it. So you can have your cake and eat it too.

1.3.2. Unambiguous Structure

XML takes a hard line ...

Get Learning XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.