3 ms·
Well, for instance, let's take the HTML code of your comment (which happens to be a valid XML document): <span class="commtext c00">I have yet to read anyt
by sacado2 7y ago
Well, for instance, let's take the HTML code of your comment (which happens to be a valid XML document):
<span class="commtext c00">I have yet to read anything that convinces me that XML is good for <i>anything</i>. Just because XML in certain cases is less bad than some other cherry-picked technology, doesn't mean that there aren't other better options.<p>See also Erik Naggum's legendary rant: <a href="https://www.schnada.de/grapt/eriknaggum-xmlrant.html" rel="nofollow">https://www.schnada.de/grapt/eriknaggum-xmlrant.html</a></span>
What would be the JSON/YAML/TOML equivalent?
- ben509 7y agoThe HTML doesn't represent the classes properly. The LaTeX would take a simpler approach: \begin{spanned} I have yet to read \textit{anything}... \end{spanned} Since there's no Javascript, probably no need for the class variables. And, of course, you can just write your own macros as you need them.
- ChrisSD 7y agoSide note: You've overdone the character entities a bit more than necessary.
- sacado2 7y agoI know, not my fault, I just copy/pasted the actual source code of the page while I was commenting.
- adamlett 7y agoIn order for me to answer that, you must be more specific about the purpose of the representation. For the purpose of authoring comments on Hacker News (HN), I for one am grateful= that HN doesn't make us type out HTML. I also doubt very much that HN stores our comments in a different representation (e.g. HTML) than the one they were authored in.
- sacado2 7y agoThat's a very good point. Thing is, markdown (or a subset of it, as on HN) is very limited. Great for short comments, bad when you want to do something a little more complex, like a blog post (I always end up addding some HTML here and there in my markdown blog posts, when I want to include a video for instance). The other problem is that HN comments and all those markdown-like formats are very ad hoc. If I copy/paste my reddit comments on HN, or the other way around, it won't always work as expected. In both cases, it has to be translated to HTML to be displayed by the browser, too. So, the context would be: an export format for complex, multi-paragraphs textual documents with meta-information.
- adamlett 7y agoSo, the context would be: an export format for complex, multi-paragraphs textual documents with meta-information. If you add the condition that it be human-readable, I admit I am not able to point to an existing format that is obviously better suited for this than XML.