News for hackers. Stuff that matters.
Re:Deprecating XML by DanHulton on Wednesday November 17, 2010 @07:37PM (#1916334)
God, but I hate XML, and sad to say, for the same reason a lot of people hate PHP.

I hate XML because it is so mis-used. People try to use it for EVERYTHING and you get these monstrous XML trees with legions of attributes, when what you're trying to send could comfortably expressed in "{success: true, message: 'Record deleted.'}".

I admit my ignorance, at least. I'm sure that were I properly shown well-used XML and these wonderful and vast tools that the competent XML worker has at their disposal, I'd be as happy to work with XML as I am to work with PHP.

That said, you won't ever catch me trying to write a 3D FPS in PHP, and I hope that if you ever DID catch me doing so, you'd give me the exact same fish-slapping that XML abusers deserve.

Re:Deprecating XML by palish on Wednesday November 17, 2010 @07:51PM (#1916368)
At the game studio I work at, they use XML for all scripting tasks: gameplay scripts and UI scripts.

As in, XML nodes are "game script commands" which are executed sequentially.

Re:Deprecating XML by Udo on Wednesday November 17, 2010 @08:02PM (#1916396)
That's kind of like XSLT, a language with an XML syntax. I can see how that is an appealing use of XML since it basically is a nice representation of a high-level syntax tree.

I believe you have come up with a rare example where XML is decidedly better suited than JSON!

However, the majority of XML use cases are for document-interchanging applications and the way those are being handled requires massively bloated toolchains of poorly inter-operating software.

Re:Deprecating XML by eru on Wednesday November 17, 2010 @09:08PM (#1916566)
If you want a language with a JSON-like syntax, consider using JavaScript. (If you want a language with a uniform syntax, that's easy to parse, choose some form of Scheme or Forth.)
Re:Deprecating XML by Udo on Wednesday November 17, 2010 @09:21PM (#1916588)
I believe though the point was that I kept wondering what it is specifically that XML does better than JSON, since the article didn't specify. And so it occurred to me that one way to make use of XML's inherent complexity is indeed to represent an instruction tree. But the question here is not what language is best, or even that JSON can used for the same purpose, it was merely the "discovery" of an inherent XML feature that would make reasonable developers prefer it for a certain task. The whole point is moot, however, since XML is actually intended for structured information interchange, regardless of any recent efforts to portray it otherwise, and that's a task which has been thoroughly taken over by JSON in the last few years.

> If you want a language with a JSON-like syntax, consider using JavaScript.

You're probably right in making this joke though, since JSON is based on JavaScript it certainly owes its popularity mostly to the browser environment.

Re:Deprecating XML by simonw on Thursday November 18, 2010 @04:41AM (#1917314)
"it certainly owes its popularity mostly to the browser environment"

I don't think that's a given. JSON is useful because it provides a clear, compact syntax for the most commonly useful data structures - lists, dicts, strings, numbers and booleans. That's certainly why I switched to it over XML (and serialised PHP objects).

Re:Deprecating XML by DanHulton on Thursday November 18, 2010 @07:33AM (#1917561)
Dear God.

Why not just... use a scripting language?

I hear LUI is pretty popular as a DSN these days.

Re:Deprecating XML by palish on Thursday November 18, 2010 @10:35AM (#1918054)
'Cause I didn't write it, I just work here. :)
Re:Deprecating XML by vog on Wednesday November 17, 2010 @10:59PM (#1916799)
Luckily, embedding more useful languages like Lua, Python or Scheme is becoming more and more common.