* Marco Antoniotti <marc...@cs.nyu.edu>
| Yes. And in the most general case you must resolve to writing a
| complex parser (which may rely on scanf) to handle the quirkiness of
| the format. That is why XML is a step in the right direction.
Bzzzt. Just Plain Wrong. XML does _exactly_ nothing to help this.
It doesn't even _enable_ something that helps the situation. XML is
just syntax for naming elements in a structure. That structure has
a view, according to the granularity at which you want to process it.
In Common Lisp, the Lisp reader increases the granularity to the
object level. This is very good. This is in fact brilliant. XML
does no such thing. XML only names the _strings_ that somehow make
up the objects, the operative word being "somehow".
How do you write a date in XML? I favor <date>2000-10-10</date>.
and yet others prefer to omit the century (nothing learned from
Y2K), write the date in human-friendly forms, or even using the
names of the months, abbreviated, in local languages, misspelled.
You can teach the Common Lisp reader to accept @2000-10-10 as a date
object, and I have. It works like a charm. What does XML offer
above and beyond specific object notations? And speaking of those
"objects", XML is supposed object-oriented, but in reality, it's
_only_ character-oriented, as in: no object in sight, as in: those
who get the named strings (counting both elements and attributes)
from XML need to parse them for their own contents -- because, and
this surprises the XML people when the limitation of their bogus
approach dawns on them, real data is _not_ made up of strings.
Strings constitute _representations_ of the data, which must be
parsed, checked for consistency and used to create objects, and if
this sounds like we're back at square 1, that's exactly the case.
XML is a giant step in no direction at all. If a syntax doesn't
produce objects that may be manipulated as such, it's worthless.
In the case of XML, it's a step in the right direction for all the
hopeless twits who otherwise wouldn't have a job in the booming IT
industry, for all those H1B visa applicants who would never have a
chance to get out of their rotten, backward countries, etc, but as
far as the information is concerned, our ability to read and write
data consistently and portably, XML offers us exactly _nothing_, but
carries huge expenses and causes investments and time to be diverted
from every smarter solution, which could be a competitor... which is
why such fine information custodians as Microsoft are adopting and
This is not to say that XML can't be used productively, but it isn't
_XML_ that's doing it when it's done, it's the semantics you add to
the syntax that does it, the objects that wind up in memory in some
computer somewhere and which there exists code to manipulate. You
can do that better, cheaper, faster, and even better standardized
without XML than with XML. XML is a truly _magnificent_ waste.
If this is not what you expected, please alter your expectations.