3 ms·
The article compares XML with JSON and YAML. That makes sense for some applications, but for other applications, like a structured text, I'd compare it with Mar
by bloak 6y ago
The article compares XML with JSON and YAML. That makes sense for some applications, but for other applications, like a structured text, I'd compare it with Markdown. I'm not happy with XML or Markdown for my source, where "source" means what I edit or what I put under version control, which aren't necessarily the same thing. I find it better to invent my own adhoc notation and write a Perl script to verify it and convert it into XML, HTML, Markdown, JSON, ...
It's a shame, but the sad fact is that humanity does not yet have an adequate and widely used way of representing structured text in a computer. XML is perhaps the closest I've seen, but the tools don't seem to be good enough or sufficiently available, and now XML is also unfashionable so I don't suppose the situation is going to get any better.
- tannhaeuser 6y agoSGML, of which XML is a proper subset, has had custom Wiki syntax parsing (such as for a fragment of markdown or CSV) since 1986. Agree with what you said about pointless comparisons of JSON vs YAML vs XML, though. Edit (regarding your point about humanity not having an adequate and widely used text format): we have SGML and it's offsprings XML and HTML. We won't be getting any new formats/standards in these times of platform economy and vertical integration, ever
- ChrisMarshallNY 6y agoYou ever hear of BNF[0]? Ugh. I used to write BNF parsers for a proprietary email system in the early 1980s. I’d rather bang rusty nails through my kneecaps. It was a fairly complete notation, though. [0] https://en.m.wikipedia.org/wiki/Backus–Naur_form https://en.m.wikipedia.org/wiki/Backus–Naur_form
- Finnucane 6y ago> I'd compare it with Markdown Which is a pretty terrible comparison. Markdown allows you to add some structural annotation to your text as you write it, without having to type a lot. That's a useful thing. But textual markup systems like TEI and Docbook go way beyond what you can do with Markdown (also, what can be practically managed in a less 'verbose' system like JSON). They also aren't really intended as authoring tools in quite the same way; you don't code them as you work. well, you might do some hand-editing of your TEI in some specialized academic archival work, but you wouldn't use that kind of coding for writing a new text.
- earthboundkid 6y agoDoes anyone know enough about LaTeX/TeX or RTF to compare them to XML here?
- wbl 6y agoLaTeX is something very, very different. It's based around macro expansion and oriented toward print, not programmatic transformation. For example if I want a programmatic table of contents for an XML document it's a simple transformation or DOM extraction exercise. If I then transform to XML-FO that will fill in the numbers. LaTeX does multiple full document renders to obtain auxiliary data for a later render to use. No XML based system does what LaTeX can do for text rendering. It's not impossible they just haven't bothered. What's more impossible is to match the ease of writing text. LaTeX gets in the way much less for most text.
- sergeykish 6y agoIt is not lost. "application/xhtml+xml" accepted by all browsers. Browser DOM is XHTML in disguise document.contentType //"text/html" document.body.namespaceURI //"http://www.w3.org/1999/xhtml" HTML is just a serialization optimized for human authoring, it has its faults script = document.createElement('script') script.textContent = '</script>' script.outerHTML //"<script></script></script>" It may be humanity does not have an adequate and widely used way of plain text authoring of structured text. DOM diff and patch may be lacking as well.
- fanf2 6y agoI'm amused because markdown started off with John Gruber inventing his own adhoc notation and writing a Perl script to convert it into HTML ...