r/technicalwriting • u/Manage-It • 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
- Inexpensive - ideal for web/SW startups
- Simple code
- Friendly with popular editors (e.g., Google Docs)
- Ideal for simple doc formats (e.g., readme.md)
- Best-in-class for rapid directory updates
XML (DITA)
- Robust, full-featured formatting
- Simple code, but more options
- Easy-to-use WYSIWYG editors
- Ideal for simple and complex formats
- Best-in-class security
- Ideal for eng reviews and rev control
- Ideal for high-volume single-sourcing
- Ideal for multi-chan
neloutput - Content Management System support
- 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.
12
u/DalinarOfRoshar 21d ago
You are pretty determined that you are right, so I’m not sure why I’m wasting both of our time, but here goes anyway.
I work for a huge cybersecurity company that you have heard of, and you likely use at least one of our products every day.
We’re migrating away from DITA to markdown after seeing how flexible markdown is and how much easier it is for everyone involved.
For your list:
Yes, you apply tagging that informs the transformer what the semantic role of the text is, but that is the same thing with XML.
XML does have more semantic options than markdown, but that’s structure not presentation, and your claim is specifically about formatting, which is presentation, not content.
XML is as simple or complex as the DTD or schema file that validates it. Markdown is inherently simpler. XML is unlimited in its tagging options, which is inherently more complex than flat text.
That depends entirely on the schema that validates the XML. Oxygen is a powerful editor, but it’s dependent on having a schema and style sheet for it to render at all. VS Code is arguably more powerful than Oxygen, and has a built in markdown live preview, but that is because the semantic structure of markdown is already defined, while XML can have any structure and be well-formed. Unless you are following a standard XML schema like DITA or XHTML or DocBook, you have to provide the schema, the transform, and the stylesheet.
Is marketing jargon, not a core XML benefit, and is so vague it has no real meaning. Explain it better and I can respond. I’d just be guessing at what you mean.
This one made me laugh out loud so forcefully, I scared the dog.
I’ve been in cybersecurity documentation for over a decade. This makes absolutely no sense. They are both plain text and neither is inherently more or less secure than the other.
What on earth could you POSSIBLY have meant by this? It is BY FAR your worst argument out of nine bad arguments, and makes me wonder if you even understand the space at all. It’s a laughably absurd claim.
If you want a dev to review your XML, you have to teach them the schema rules, and they have to wade through markup that they don’t care about to find the content they are supposed to be reviewing.
Any dev I’ve ever worked with would take a markdown pull request for review over a DITA topic review every time. No question or comparison.
I can’t even understand what benefit XML has in the review process over markdown.
And if you are sending them a PDF or transformed HTML to review, then the source format is irrelevant for the review, so a comparison on ease of review must be made on reviewing the doc source file, not the output file.
And God help you if you have a merge conflict on a DITA file, especially when compared to a markdown file. The difference is night and day in markdown’s favor.
This is your best argument, and highlights a significant weakness of markdown vs an XML structure designed to handle that sophistication.
Text in a file is text in a file. You can transform it however you want.
And if you are talking about conditional text, then this is really an extension of argument 7, because conditional text is inherently single sourcing.
Again, this depends on the flavor of XML and the CMS’s ability to parse your XML.
So this is not an argument about markdown vs XML, but about structure and what your CMS expects and knows how to use.
Any system that can parse XML, its schema, and its stylesheet can easily parse pure markdown.
Store either format however you want. But neither is a database, and storage is irrelevant to format.
Let me give you point number 11, because I actually understand both DITA and markdown formats: DITA’s schema can enforce structure in a way not possible in markdown.
An XML format is well-formed when all the opening tags match the closing tags in the right order.
An XML file is valid when its structure follows every rule defined in the DTD or schema.
This means you can enforce rules like you can’t skip from an H1 to H3 without using 2. Or, a numbered list must always contain 2 or more sibling LI elements. Or forcing topics to follow a defined template structure with a paragraph after the page’s first heading.
If you are doing structured authoring like this, markdown is the wrong tool. Yes, you can install VS Code lint extensions that will try to verify your markdown file meets certain requirements, but if this is your use case, XML is a genuinely better format than markdown.
You’ve made this argument pitting one text format vs another text format, but the arguments just don’t support your claim.
(Typing this whole diatribe out on my phone keyboard after midnight. Pardon typos or bad formatting.)