8 The Extensible Markup Language (XML)
Guiding Question: What if every field of knowledge could create its own markup language?
By the mid-1990s, HTML had already begun transforming the World Wide Web.
Its collection of tags—headings, paragraphs, lists, tables, and hyperlinks—provided an effective way to describe web pages.
Yet many organizations soon encountered a limitation.
Their documents contained information that HTML simply could not describe.
A hospital might need to identify patients, diagnoses, prescriptions, and laboratory results.
A publisher might need to describe chapters, authors, footnotes, indexes, and bibliographic references.
A manufacturer might wish to represent machine parts, maintenance schedules, and technical specifications.
A university might require detailed descriptions of courses, students, and examinations.
None of these concepts belonged naturally within HTML.
The problem was not that HTML was inadequate.
It was that every field speaks its own language.
What if each discipline could create a markup language tailored to its own knowledge?
That question led to the development of XML.
8.1 What Is XML?
XML stands for Extensible Markup Language.
Unlike HTML, XML does not define a fixed collection of tags.
Instead, it provides a framework for creating your own.
An XML document describing books might contain elements such as:
<book>
<title>The Textsmith Primer</title>
<author>Ishe</author>
</book>A medical application might use entirely different elements.
A financial system would define another vocabulary.
The tags themselves are chosen by the designers of the application rather than by XML.
In this sense, XML is not a markup language in the traditional sense.
It is a language for creating markup languages.
8.2 Structure Above All
One of XML’s central principles is that markup should describe meaning rather than appearance.
Consider the following element:
<chapter>XML does not specify how a chapter should look.
It simply identifies that a section of the document represents a chapter.
Whether the final result becomes a printed book, a website, an accessible document, or an ebook depends upon software that interprets the XML.
This philosophy strongly reinforces one of the recurring themes of this primer:
Structure comes first.
Presentation comes later.
8.3 Rules Matter
Compared with HTML, XML is deliberately strict.
Every opening tag must have a matching closing tag.
Elements must be properly nested.
Documents must follow precise syntactic rules.
For example, this is valid XML:
<chapter>
<title>Introduction</title>
</chapter>This is not:
<chapter>
<title>Introduction
</chapter>Such strictness may initially seem inconvenient.
In reality, it provides an important benefit.
Because XML documents follow consistent rules, computers can process them reliably.
Machines appreciate precision.
8.4 A Language for Every Discipline
Perhaps XML’s greatest achievement lies in its adaptability.
Instead of forcing every field into the same vocabulary, XML allows each community to define its own.
Over the years, hundreds of XML vocabularies have emerged.
Some describe books.
Others represent legal documents.
Some capture chemical information.
Others model mathematical expressions, musical notation, geographical data, or technical documentation.
Each vocabulary reflects the needs of its own discipline while remaining compatible with the broader XML ecosystem.
This flexibility explains why XML became one of the most influential technologies of digital publishing.
8.5 XML and Publishing
Publishers quickly recognized XML’s potential.
Rather than storing books in proprietary word processor formats, publishers could represent manuscripts as structured XML documents.
A chapter remained a chapter.
A footnote remained a footnote.
A bibliography remained a bibliography.
Once the structure was captured, software could transform the same source into multiple outputs.
Printed books.
PDFs.
Websites.
EPUB ebooks.
Accessible editions.
Single-source publishing became not merely practical but highly efficient.
Many modern publishing workflows continue to rely on XML behind the scenes.
8.6 XML in Everyday Computing
Even users who have never written XML encounter it regularly.
For many years, office document formats have relied heavily on XML.
Configuration files frequently use XML.
Data exchange between applications often employs XML-based formats.
Android provides another familiar example.
Application interfaces are commonly described using XML.
Instead of drawing buttons and layouts manually in code, developers describe the structure of the interface.
Software then renders the visual result.
Once again, XML emphasizes describing what exists rather than how it should ultimately appear.
8.7 XML and HTML
Although HTML and XML are closely related, they serve different purposes.
HTML defines a standard vocabulary for web pages.
XML defines a framework for creating entirely new vocabularies.
One asks:
“How should web documents be structured?”
The other asks:
“How should any kind of structured information be represented?”
This distinction explains why XML complements HTML rather than replacing it.
Each solves a different problem.
8.8 The Legacy of XML
XML’s influence extends far beyond the documents people edit directly.
Many technologies quietly depend upon XML.
Specialized publishing systems.
Technical documentation.
Scientific publishing.
Office document formats.
Configuration systems.
Mobile applications.
Numerous data interchange standards.
Even when users interact with friendlier formats such as Markdown, XML often appears later in the publishing pipeline as documents are transformed into professional output.
Its presence is frequently invisible.
Its influence is enormous.
8.9 Lessons for the Textsmith
XML reminds us that markup is not limited to books or websites.
Every field of knowledge has its own concepts, relationships, and structures.
A good markup language reflects those structures faithfully.
This insight continues to shape modern publishing.
Rather than forcing every document into a single universal format, XML encourages communities to create languages that describe their knowledge accurately while remaining compatible with a common framework.
That philosophy has made XML one of the quiet giants of digital communication.
8.10 Key Ideas
- XML is a framework for creating markup languages rather than a fixed markup language.
- XML emphasizes describing structure and meaning rather than appearance.
- Strict syntax allows computers to process XML documents reliably.
- Different disciplines can design their own XML vocabularies.
- XML transformed digital publishing through structured, reusable documents.
- Technologies such as DocBook, DITA, office document formats, and Android layouts build upon XML.
- XML continues to play a central role in publishing, data exchange, and software development.
In the next chapter, we turn from universal markup frameworks to one of the most celebrated achievements in digital publishing.
How can plain text produce documents of typographic quality worthy of the world’s finest books?
That question inspired Donald Knuth’s creation of TeX and, later, LaTeX.