Hacker News new | comments | show | ask | jobs | submit login

XML has includes and you can have data types like string, int, time intervals, strings with regex, etc. with an XSD, if you want.

The complexity this brings can be overwhelming compared to an ad-hoc config file format.




XML is too verbose for manual editing and I've yet to see an XML library that isn't cumbersome to use (compared to JSON). It's probably too complex, alright. But I'm convinced a simpler format could be specified.

But your complexity comparison is unfair. Ad-hoc file formats are overwhelming. Users don't see the complexity because there is no spec and they just write config files by example. Developers generally either give up or write something that doesn't behave quite the same. A fair comparison would be:

  """"
  XML looks like this:

  <section>
    <subsection>
      <key>value</key>
    </subsection>
  </section>
  """
That's about the level of detail in the documentation of most ad-hoc file formats I've seen. Followed by hundreds of examples that happen to show (but not specify) special cases.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: