Roedy Green said:
Why do you think to two are incompatible? Why not have a standard
predigested, preparsed binary format for XML, just as flexible, just
more rigidly defined, and naturally error free, more compact, and
faster to process, with smaller classes?
My objection is more from experience with opaque formats than anything
else.
In my experience, and in the files I have seen, most people doing XML
tend to use it for everything, and to be fairly transparent about it.
There are exceptions, such as Microsoft's file formats, and some I have
seen where the files are just chunks of base 64 encoded glop, but in the
main, elements get stored human readable. As long as that property is
preserved, the actual representation on disk is less important.
Again, in my experience, the majority of binary file formats seem to
store the memory image of their data, without any metadata to make it
parsable. Predigesting XML would be far better, but I have a suspicion
that the programmers who would be most attracted to it are those who
would write binary glop unless the tools were very compelling. Very,
very compelling. Again, not impossible to overcome, but I am not sure
the will is there.
The one big concern I have is tools - damn near anything can read an xml
text file, and produce something I can figure out, without needing any
extra tools installed on servers, other people's computers, and the
like. If the undigester tools were a required part of the parsers, then
I might have the same level of access by default.
Put another way, by being plain text, XML lets me watch what goes over
the wire and on the disk without needing any collusion by the developers
and system administrators involved. Alternative formats that have the
same property would keep me just as happy, but my experiences make me
suspicious.
Scott