Python to XML to Python conversion

Alex Martelli aleax at aleax.it
Fri Jul 12 04:01:36 EDT 2002


Jeremy Bowers wrote:
        ...
> the choice of *last* resort, when you absolutely *need* easy parsing in
> multiple languages or environments and can't get it any other way. It is

I think this assertion, as it stands, is untenable.  There just about
IS *some* other way -- e.g., inventing your own little language for
data description and writing from scratch the needed parsers in all
languages and environments of interest.

Are you SERIOUSLY claiming that such reiterated reinventions of the
wheel -- which were a good part of the data interchange "state of the
art" before XML appeared -- should be used in preference to XML?!

Similar comments apply to most traditional ways of data interchange
in heterogeneous environments -- overextensions of simplistic formats
such as CSV, empirically-determined parsing and heuristics for
unspecified and underspecified proprietary and human-oriented formats,
rigid and unportable binaries.  XML is generally preferable to any
of these traditional kludges, even though one or more of them most
often IS available and thus breaks your dubious criterion of "can't
get it in any other way".

Apparently, the ridiculous over-hype that has greeted XML in parts
of the media (including much non-technical media) is triggering an
allergic reaction of similarly-ridiculous hostility.  On one side
we see abuses such as XML files used where (e.g.) relational DB's
would be the obvious solution, on the other, broadsides such as
this one definitely appears to be.

Fortunately, there's a lot of us engineers in the middle, applying
skeptical, field-tested "filters" to media hype AND other overbroad
tirades.  XML is often a good choice for heterogeneous-environment data 
interchange -- far from being "the choice of *last* resort" for such
tasks, it's generally a good default choice unless some obviously
better alternative is evident.  For tasks that are borderline cases
of "heterogeneous data interchange", such as storing and retrieving
(or communicating) data among a set of programs that aren't really
all that heterogeneous, XML should still be considered when ability
to examine and potentially tweak the stored data with other programs
is of interest, and the costs wrt proprietary or language-specific
formats (in terms of time and/or space) aren't out of line with the
potential benefits.


Alex




More information about the Python-list mailing list