OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   re: [xml-dev] Why XML?

[ Lists Home | Date Index | Thread Index ]

Matthew.Bennett@facs.gov.au writes:

 > I appreciate XML's strengths re: markup, but I don't think it has
 > much of a role in data exchange. Why would anyone use something as
 > arcane as XML when flat files have worked perfectly well since
 > .... whenever. Between 'trusted' parties, anyway.

You are right -- XML does not make sense if two parties are exchanging
data, use exactly the same table structure in their relational
databases, and do not intend to do anything with the data but dump and
restore it to relational databases.  I can get CSV into an RDBMS in a
couple of minutes, but it would take me a couple of hours to write the
import routines for arbitrary XML.  Use the right tool for the job.

 > Two things make me wonder about the competence of those who
 > designed XML.

It's taken this long?

 > 1. If you wanted to keep it comprehensible, why invent nonsense
 > like attributes? What can they do that nested elements can't?

They (I wasn't on the WG yet) didn't even invent attributes; they just
plagerized them from SGML.  The attribute/no-attribute debate was a
permathread on SGML lists long before XML came along, sort-of like the
emacs/vi debate in the Unix world.

 > W3C has violated a first-order principle of language design; that
 > there should only be one way of doing something, such that everyone
 > ought to devise the 'same' program to solve the 'same' problem.

 int x = 0;
 while (x < 10) {
   printf("hello\n");
   x++;
 }

 int x;
 x = 0;
 do {
   printf("hello\n");
 } while (x++ < 10);

 int x;
 for (x = 0; x < 10; x++)
   printf("hello\n");

 /* etc. */

It's clearly a principle rarely put into practice (I won't even start
on the Common LISP looping constructions).

 > And 2. If a start tag must have a matching end tag, what purpose is
 > served by that ridiculous slash in an end-tag?

As a parser writer, I can answer this one -- it eliminates the need
for lookahead.  Consider

  <foo>This is foo <foo>and this is a nested foo.</foo></foo>

without the slashes, you'd have

  <foo>This is foo <foo>and this is a nested foo.<foo><foo>

You wouldn't know until the end of the document which ones started
elements and which ones ended elements, and even then it could be
ambiguous.


All the best,


David

p.s. Nice troll -- you even got me to respond!

-- 
David Megginson, david@megginson.com, http://www.megginson.com/

  • References:
    • Why XML?
      • From: Matthew.Bennett@facs.gov.au



 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS