O'Reilly logo

Learning XML by Erik T. Ray

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required