News for hackers. Stuff that matters.
Re:SVG: The Good, the Bad and the Ugly by kumarvvr on Friday February 12, 2021 @12:14PM (#26115924)
JSON is a really poor format for anything but simple data.

XML may be verbose and not readable, but it is an excellent format for describing and storing data.

One alternative for SVG could be an SQL table like datastore, similar to sqlite. I would love yo have the ability to query data, rather than parse through XML. I do understand that transferring such data blobs over networks is an issue.

Re:SVG: The Good, the Bad and the Ugly by mywittyname on Friday February 12, 2021 @01:03PM (#26116548)
The biggest issue I have with XML is the ambiguity between attributes and child elements. The distinction makes sense in an abstract perspective, but real-world implementations rarely use them in a consistent manner.
Re:SVG: The Good, the Bad and the Ugly by Groxx on Friday February 12, 2021 @01:35PM (#26116881)
One's a dictionary (unordered, simple unique keys), and one's a list (ordered, arbitrary contents, no uniqueness constraints). Schemas may enforce more, but those are the intrinsic qualities.

I agree that use varies widely, but the difference is fairly clear. The existence of nonsense doesn't mean one can't make good decisions.

Re:SVG: The Good, the Bad and the Ugly by qwertay on Friday February 12, 2021 @05:31PM (#26119299)
Is it more logical to have a point tag which has the attributes x and y or have x and y as their own tags and values? Its not clear to me which makes more sense and it seems the spec writes using xml didn't know either.
Re:SVG: The Good, the Bad and the Ugly by Groxx on Friday February 12, 2021 @05:52PM (#26119499)
since x and y are simple names, have simple values, and are unique pairs that apply only once to a point: attributes.

to use anything else means relying on an arbitrarily-complex custom schema rather than the much-simpler-and-far-more-standard schema of the language itself. similar to how we use datatypes in programming languages rather than just strings everywhere. both work! one is clearly giving up a lot, and gaining little.