Glossary · 3 · Publishing SDKs and structured content
Extensible Markup Language (XML)
Also known as: XML
In computing, the Extensible Markup Language (XML) is a W3C markup language, first published as a W3C Recommendation in February 1998 as a subset of SGML, for representing structured documents and data as nested elements with attributes; an XML document is well-formed if it follows the syntax rules and valid if it also conforms to a grammar such as a DTD.
- Publishing SDK
- Structured content
- Standards
In one sentence
XML is a W3C markup language derived from SGML for structured documents and data as nested elements; documents can be well-formed and valid.
Example
A DITA task is an XML document whose root element task contains a title and steps; a parser checks that it is well-formed and the DITA grammar checks that it is valid.
How it applies
- Publishing SDKs: XML is the source format of most structured-content toolchains. DITA, DocBook and many industry formats are XML vocabularies; publishing engines read the XML, resolve references and transform it with XSLT into HTML, XSL-FO for PDF or other outputs.
- Well-formed vs. valid: The XML specification distinguishes well-formed documents, which follow the syntax (for example one root element and properly nested, closed tags), from valid documents, which also meet the constraints of their document type definition. Grammars in XML Schema or RELAX NG and rules in Schematron extend validation; see Schema (data) and schema validation.
- History: The first edition of XML 1.0 (W3C Recommendation, February 10, 1998) described XML as a subset of SGML designed to let generic SGML be served, received and processed on the Web. The current text is the fifth edition of XML 1.0 (November 26, 2008), which is not a new version of XML but incorporates accumulated errata.
- Developer and platform SDKs: Configuration files, project files, extension manifests and many APIs use XML; for API payloads JSON has become more common, and binary serialization formats are used where size and speed matter.
- Hardware SDKs: Device descriptions, register maps and configuration exchange formats in embedded and automation tooling are often XML vocabularies, for example PLCopen XML.
- Documentation: Name the XML vocabulary, its version and the grammar used for validation; the plain statement "the content is in XML" says little about what a tool can do with it.
XML vs. JSON
Both represent structured data as text. XML has elements and attributes, mixed content (text with inline markup) and mature grammar and transformation languages, which suits documents. JSON has objects, arrays and simple types without mixed content, which suits data exchange in APIs. Technical documentation sources are usually XML or lightweight markup; delivery APIs often return JSON.