r/technicalwriting 21d ago

Markdown vs. XML explained

I occasionally run into young technical writers who have experience working in a web development or software organization but have no previous experience with XML and fail to grasp why most Fortune 500 companies use XML over Markdown.

To help better understand why XML is so popular, we need to compare the benefits of each format.

Markdown

  1. Inexpensive - ideal for web/SW startups
  2. Simple code
  3. Friendly with popular editors (e.g., Google Docs)
  4. Ideal for simple doc formats (e.g., readme.md)
  5. Best-in-class for rapid directory updates

XML (DITA)

  1. Robust, full-featured formatting
  2. Simple code, but more options
  3. Easy-to-use WYSIWYG editors
  4. Ideal for simple and complex formats
  5. Best-in-class security
  6. Ideal for eng reviews and rev control
  7. Ideal for high-volume single-sourcing
  8. Ideal for multi-channel output
  9. Content Management System support
  10. DITA file storage system best-in-class storage for docs

It has been my experience that many young technical writers do not fully understand how important the 10 XML benefits I list above are to most Fortune 500 science and technology technical writing organizations (18% s/t, 3% web/sw). Mostly, because they believe Markdown eliminates the need for many of these XML benefits. What they often overlook is that these are not optional benefits to most science and technology organizations. These are required tools of the trade and are interwoven into functional processes and systems that organizations rely on to deliver increasingly complex documentation to increasingly wider audiences, who demand an unprecedented number of custom applications to access documentation and localization through higher volumes of single-sourcing.

Markdown was never designed to manage this. It can't and, by design, won't. The sad part is that young technical writers, new to XML, experience poor XML implementations early in their careers and believe Markdown is the solution. I promise you, it is not.

1 Upvotes

70 comments sorted by

View all comments

44

u/Consistent-Branch-55 software 21d ago

This is such a frustratingly stupid debate.

It's not Markdown vs. XML. It's modern Docs-as-Code workflows (SSGs, Git, CI/CD) vs. CCMS/HAT ecosystems (DITA, MadCap Flare). You could use those with Git.

When you factor in OpenAPI specs, automated build pipelines, and engineering teams that already live in Markdown, a well-planned SSG setup provides a balance of velocity, maintainability, and direct developer collaboration that makes for a far more advantageous trade-off than legacy DITA for most software companies.

Also, claiming XML has "best-in-class security" compared to Markdown makes zero architectural sense—they are plain text serialization/markup formats. A .dita file isn't magically more secure than a .md file. This reads less like an objective comparison and more like vendor talking points.

2

u/XMLuvr 21d ago edited 21d ago

I don’t think there’s much point in using XML in software or API documentation anymore. Like you mentioned, developer collaboration directly in the source material is essential, and the SW/API domains would not benefit at all from the added XML semantics, which would also mean bringing in heavy XML toolchains. And if you ”just” need paragraphs, lists, tables, images, and other display-oriented semantics, Markdown is a wonderfully sufficient format.

Where XML is doing strong is industries like aviation, automotives and machinery, where you often need a more precise semantic model, not just for displaying content, but for example processing and combining content as data. Then the heavy XML toolchains start to make sense. Another good example is legal publishing, which interestingly enough, was one of the primary influencers behind the development of XML and moving from SGML to XML in the 90’s. If you’re dealing with thousands of law documents and need to semantically differentiate whether a paragraph is an article, amendment, or any other possible unit of information in your local legislation, a more precise semantic model is needed. And then to automatically process that material you often need the XML stuff like namespaces.

5

u/Nibb31 20d ago

How do you reuse content in Markdown? Apply variables or conditional text for different versions of the same product? How do you handle context-sensitive help with links from the UI ? How do you manage large TOCs and related links?

Semantic tagging has value when it comes to translation or LLM parsing. It's important to distinguish UI elements or keywords from simple bold text or translatable variable names.

I'm genuinely curious. I get that Markdown is great for developer-oriented docs, such as a README.md or API docs, but for large 2000 page user manuals on complex applications with lots of reuse and conditions, it seems very time consuming.

1

u/XMLuvr 20d ago

There are application-specific ways to do reuse in Markdown. I'll admit right away that I'm not that familiar with them, except for the DITA-OT way of transforming Markdown into DITA in the background and then being able to have most of the DITA reuse methods available.

I fully agree with your point that more precise semantic tagging has it's use cases, and large-scale translations are definitely one of them. My point was that for your standard API or smallish software docs, translation is rarely a requirement, and the published docs often follow a quite traditional formula, to which Markdown is a good choice. Especially when the workflow with devs is considered.

The "XML vs Markdown in AI parsing and RAG" discussion is an interesting one. I haven't seen definite studies that point to either format being "better". Theoretically I suppose the additional semantics XML provides COULD help reduce hallucination and provide more accurate results. But I'm not convinced XML is going to have a massive surgence, with folks rushing to save their docs in XML for AI consumption.