News for hackers. Stuff that matters.
Re:XML is almost always misused by scott_s on Tuesday October 29, 2019 @05:39PM (#21392370)
I agree. The author and other commenters here have not proposed an alternative which provides two features I consider critical to a generic data format: schema specification and validation; and easy parsing support in many ecosystems. JSON and Yaml don't seem to have mature, widely adopted schema specification and validation. And I'm not aware of anything outside of XML, JSON and Yaml which have such wide parsing support in so many different ecosystems.
Re:XML is almost always misused by theamk on Tuesday October 29, 2019 @10:09PM (#21394035)
JsonSchema is pretty good -- it is not as widely used as XSD, but it has libraries for most languages.

And of course JSON is the easiest thing to parse in scripting languages, like Python and Ruby -- the entire API is one line, and then you have a native structure you can work with.

Re:XML is almost always misused by spiralx on Friday November 01, 2019 @11:38AM (#21419942)
> JsonSchema is pretty good -- it is not as widely used as XSD, but it has libraries for most languages.

It's okay now that the newest revisions support more realistic use cases, but ironically I find it impossible to write as JSON... I write them as YAML which my validator supports natively :)

It's still not as nice as RELAX-NG's compact schema format though IMO :)

https://relaxng.org/compact-tutorial-20030326.html

And the LXML library for Python was a pleasure to use compared to any other similar library I've used.