As stated in the intro, many databases and applications produce XML so that's what we have to deal with. All else being equal I'd rather work with JSON but I rarely control both ends down to the DB. It's interesting to note that couchdb switched from XML to JSON. I had written some e4x code against that XML but what I did with xul/e4x is much easier now with JSON and html ui frameworks. Scala does some interesting things with literal XML, like matching against elements, but with a more XPATH-like syntax for referencing xml objects. I prefer the e4x syntax. The javascript frameworks can leverage JSON, e4x and xlinq "under the covers". Anyhow, I think e4x will last as long as people keep putting XML on the wire.
I think that the minor stream of XML coming from the server will be giving way to a flood soon; there's just too much going on in the distributed server space to not expect that to happen.
That doesn't obviate JSON as a delivery mechanism; there are places where JSON is generally the most efficient way of sending content, and JavaScript is geared towards JSON while e4x support for the most part still exists mostly in islands. However, I think of that if any database produced only one format (either XML or JSON) they are being foolish in the extreme.
Greetings:
I'm the sole Mac OS X developer for a Microsoft shop here in Silicon Valley. Their clients are increasingly demanding OS X support (about time).
One of my assignments is to interface with Entourage/Mail Server, with XML being the data vector. I must support Firefox 2+ & Safari 3+.
I've used Firefox 2 on an earlier project because of its support for E4X.
Question: Does Safari 3.0 support E4X? I suspect it does, yet there's no DIRECT answer. And for that matter which JavaScript version does Safari 3.0 support? Firefox 2+ supports JavaScript 2.0.
And, where's XQuery?
I've read about it, sound exciting...
... but I don't know which browsers support it; and to that effect, whether Apple's Web Kit supports E4X & XQuery.