Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> It's designed to be written by hand

Are you sure about that? I've heard XML gurus say the exact opposite.

This is a very good example of why I detest the phrase “use the right tool for the job.” People say this as an appeal to reason, as if there weren't an obvious follow-up question that different people might answer very differently.





SGML was designed for documents, and it can be written by hand (or by a machine). HTML (another descendant of SGML) is in fact written by hand regularly. When you're using SGML descendants for what they were meant for (documents) they're pretty good for this purpose. Writing documents — not configuration files, not serialized data, not code — by hand.

XML can still be used as a very powerful generic document markup language, that is more restricted (and thus easier to parse) than SGML. The problems started when people started using XML for other things, especially for configuration files, data interchange and even for programming language.

So I don't think GP is wrong. The authors of the original XML spec probably envisioned people writing this by hand. But XML is very bad for writing by hand the things that it eventually got used for.


Perfectly sure. XML is eXtensible Markup Language, the generalized counterpart to Hypertext Markup Language.

XML, HTML, SGML are all designed to be written by hand.

You can generate XML, just like you can generate HTML, but the language wasn't designed to make that easy.

Computers don't need comments, matching </end> tags, or whitespace stripping.

There was a time, in the early-mid 2000s when XML was the hammer for every screw. But then JSON was invented and it took over most of those use cases. Perhaps those XML gurus are stuck in a time warp.

XML remains a good way to represent tree structures that need to be human editable.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: