XML overuse? (was Re: Python to XML to Python conversion)

Jonathan Hogg jonathan at onegoodidea.com
Fri Jul 12 12:20:46 EDT 2002


On 12/7/2002 15:37, François Pinard wrote:

>> You might say that this is verbose and monstrous,
> 
> Your wish is my command.  This is verbose and monstrous! :-)
> 
>> but it's readable and fairly obvious in meaning.
> 
> The original non-XML format is also pretty readable and obvious in meaning.
> Surely, there are advantages to XML, but at first glance here, it seems we
> gain nothing but verbosity and monstrosity.  In my opinion, the advantages
> have to be pretty real to justify such a change.  We should not go XML
> for the only sake of going XML.

I had thought I'd given arguments and examples as to why the XML was more
useful in the rest of the post, but perhaps I wasn't as clear as I thought I
had been.

To summarise the advantages of using XML as I see them:

 * Standardised parsing  (PyXML etc.)
 * Standardised validation  (DTDs, XSchema)
 * Standardised editing  (XML-aware editors)
 * Standardised querying  (XPath, XQuery)
 * Standardised transformation  (XSLT)
 * Standardised storage  (XML:DB)

I really am willing to eat humble pie here and admit that I'm mistaken if
someone can give me a similar list of good reasons to *not* use XML for
off-line hierarchically structured data.

Like I said before, I can spend time trying to think of a structured file
format for each application I work on, or I can just use an XML schema.
Thanks to batteries-included parsers it's easy to read and write, the data
is readily re-purposed for other uses, and I get syntax highlighting and
basic syntax checking in my editor. At a later date I can easily shift to
using an XML database instead of XML files.

Perhaps I'm missing something blindingly obvious here, but what benefits
would I gain from coming up with my own format?

[Other than people who have some kind of allergic reaction to XML would like
it more.]

Jonathan






More information about the Python-list mailing list