[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

re: Why XML?


while x xml
Matthew.Bennett@f... 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@m..., http://www.megginson.com/

  • References:

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.