[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] re: Why 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/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|