XML (Extensible Markup Language)
XML, short for Extensible Markup Language, is a text-based markup language for the structured representation and exchange of data with named, nested elements and attributes. Which elements are permitted or required can be defined by a schema such as XSD or a DTD.
XML is readable by humans and machines and is often used for exports, data feeds and sitemaps, for example in data migrations between CMSs. For web interfaces, the more compact JSON has also become widely established.
Why this matters for you
In many systems, XML is still the standard for data exchange: for XML sitemaps for search engines, RSS feeds, product data for marketplaces or CMS exports. Basic knowledge helps to recognize errors in migrations and imports faster and to talk precisely with IT and service providers.
Context
XML was published as a standard by the World Wide Web Consortium in 1998. Data is marked up with tags, similar to HTML, except that the tags can be freely defined. An article can, for example, be enclosed in an element article with the sub-elements title, author and text. Nesting creates hierarchical structures that are readable by humans and machines.
Schemas can be used to define which elements are permitted and required, which makes XML suitable for reliable exchange between systems. In web interfaces, XML has often been replaced by JSON, which is shorter and easier to process. For sitemaps, feeds, document formats such as Word and Excel and industry standards, however, XML remains widespread.
What do you need XML for in a CMS migration?
In a CMS migration, XML often serves as an exchange format to export content including structure and metadata from the old system and import it into the new one.
Many systems offer XML exports in which articles, authors, categories, tags, publication dates and references to media are available as named elements. The new system or a migration script reads these elements and maps them to the fields of the new content model.
For you as a marketing team, it is important to check a sample of the export before the migration starts. That way you discover in good time if fields are missing, special characters are damaged or images are only available as references. Also clarify how content from page builders or embedded modules is exported, because it is often lost in migrations or only arrives as unstructured text.
What examples of XML in marketing are there?
Marketing teams encounter XML more often than it seems:
- XML sitemap: shows search engines all important pages of a website with the date of change.
- RSS feed: provides new posts for feed readers and aggregators.
- Product feeds: deliver product data to Google Merchant Center or marketplaces.
- CMS export: many systems such as WordPress export content as an XML file.
- Office files: Word and Excel files consist internally of XML.
- Industry standards: for example BMEcat for product catalogs in B2B.
An export describes articles and associated metadata in an agreed XML format.
Typical mistakes
- Editing the file in a word processor: typographic quotation marks and formatting make XML invalid.
- Not escaping special characters: characters such as the ampersand must be written in a special way in XML.
- Ignoring encoding: without consistent UTF-8 encoding, special characters such as umlauts are displayed incorrectly.
Frequently asked questions
XML or JSON: what is the difference?
Both formats represent data in a structured, machine-readable way. XML works with opening and closing tags and attributes and is well suited for documents with nested content and strict validation via schema. JSON uses key-value pairs, is more compact and widespread in web interfaces. Which format you use usually depends on what the systems involved offer.
What do you need an XML sitemap for?
An XML sitemap lists the URLs of a website that search engines should crawl, optionally with the date of the last change. The file helps above all with large websites, new pages or weakly linked content. The sitemap does not guarantee indexing. Submit it to search engines and have the CMS update it automatically.
Do marketing teams need to be able to read XML?
Basic knowledge helps; programming knowledge is not necessary. Whoever recognizes how elements, attributes and nesting are structured can roughly check exports, product feeds or sitemaps and report errors such as missing fields or incorrectly displayed special characters faster. For transformations and imports, support from IT or service providers remains useful.
How do you check an XML file for errors?
Check an XML file in two stages. First for well-formedness: are all elements correctly opened and closed and special characters correctly encoded? Then for validity against the agreed schema, that is whether all required elements are present. Validation tools do both automatically. You only find content errors such as wrong categories with spot checks.
What is XML, simply explained?
XML is a text format with which data is stored in a structured way and exchanged between systems. The data is provided with freely selectable labels in angle brackets, similar to HTML. Well-known examples are XML sitemaps for search engines and RSS feeds.
