Re: XML: The good, the bad, and the ugly

From: Marshall Spight <mspight_at_dnai.com>
Date: Mon, 18 Oct 2004 05:55:36 GMT
Message-ID: <rVIcd.267691$D%.111425_at_attbi_s51>


"Christopher Browne" <cbbrowne_at_acm.org> wrote in message news:2tgmgeF1v44fjU1_at_uni-berlin.de...
> "Marshall Spight" <mspight_at_dnai.com> wrote:
> >> XML, it seems to me, is a format designed for general data transfer.
> >
> > It's a format designed to markup text with presentation, which
> > is part of why it's so *bad* for general data transfer.
>
> It's a recreation of Lisp s-expressions produced by people that got
> there by hacking on SGML who, as likely as not, didn't know they'd get
> s-exprs, and wound up with something less good...

Exactly.

> It's NOT for "marking up text with presentation;" the creators
> certainly _did_ know that what they were doing was to create a way of
> structuring data that _wasn't_ about presentation.

I dunno. What was SGML designed for? What design considerations changed from SGML to XML?

> Just so. The APIs to connect to the existing parsers aren't
> particularly simple...

The DOM API in Java is one of the worst Java APIs I have ever seen. (The only thing worse is the Advanced Imaging API.) It doesn't even use Java strings, fer cryin' out loud! JDOM at least is a "native Java" API.

But it's still intrinsically hard to make a good API for it, because the underlying abstraction is so poor. Why are there both attributes and nested tags? What's this about CDATA? How do we negotiate character encoding? Does whitespace matter or doesn't it?

Marshall Received on Mon Oct 18 2004 - 07:55:36 CEST

Original text of this message