Nicholas Wieland nicholas_wieland at yahoo.it
Sat Jun 21 05:25:15 CEST 2003

 - Roman Suzi : 
> I have a feeling that XML steadily moves out of buzz-word set into usual life.
> But along with this I have a feeling that XML is not as useful as it was
> presented during it's hype period. I myself have not found any use for it.  
> There is always something more practical than XML.

Probably more practical, but also convenient ? :)

> The main area where I'd liked XML to be useful is Web content. I am supporting
> (on a volunteer basis) some web projects and in my interests is to get raw
> material put into static HTML in as little time and effort as possible.
> It seems like good idea for XML - but alas my adhoc data formats are simpler
> and less keystroke demanding.
> I just wanted to hear opinion of Pythoneers about practicality of XML. I do
> not question it's usefulness when interfacing with some XML-powered system.
> But isn't it an overkill for simpler tasks? Or maybe I am missing some great
> opportunity to do work faster and simpler?

It depends: what are you trying to do ? I think that putting raw
material into static *X*HTML is *not* the best approach to XML.

> Let me present an example. I want to maintain data about my employer's
> agencies in our region and other information (like phone numbers, addresses,
> etc) for a presentation on a web-site. It looks like a perfect fit for an XML
> because the data is tree-like. Right now I am using several tables in RDBMS to
> represent the data and it takes several selects and Python glue to make a
> human-readable presentation of it. The main goal is to make any factual change
> a one point change. However, there are only 2 views of the data so creating
> XML-powered scripts for them seem to be overkill...

You say you're using several tables in a RDBMS, probably XML is
overkill, the only benefit you can obtain is interoperability, but if
you're searching a practical way to accomplish your task I think you're
on the wrong way.
As a 'general' rule, if you're using a RDBMS, XML just means overhead
(not always of course).
You must distinguish between data-centric and document-centric.
A data-centric XML document contains a regular structure, so you can
easily use a RDBMS for your data, and you can use XML for
interoperability with other applications, but if you just need to
display your data don't use it.
A document-centric XML document is rather different, and, for example,
you can't use a RDBMS, but an NXD (but his is a complete different story
If your application grows you probably want XML, probably SOAP or
XML-RPC, or maybe an XSLT stylesheet to represent your data on different
> I am trying to find use of XML in my doings for 2 years already and every time
> I find XML not appropriate for the task. XML is human readable but I think it
> is still hard to edit XML files by hand. This is not the problem with
> machine-generated/read data but other, adhoc formats (like plain Python) are
> even less problem. What is the niche of XML? I do not believe it makes
> interapplication communication more robast (I think it's of the same quality
> as OOP helping code reuse). Dealing with XML requires more effort than dealing
> with ASCII texts by grep or re.search().

Not at all.
You don't have to edit XML by hand, you want an authoring tool, XML is
not human readable for editing, it's human readable to avoid all the
mess of proprietary 'standards'. If Microsoft DOC format is XML I can
reverse it in ten minutes, but DOC is not XML and every time I try to
open a complex DOC file with OpenOffice I know I have to correct all the
layout errors.
And I don't think I'd call XHTML a 'niche'. XHTML is suceeding avoiding
all the mess on the web generated using HTML for layout
and not for content, with a table nested into a table nested into a table
nested into a table ... for displaying a logo ! :-]
Using XHTML with CSS is really better: the pages are more accessible,
faster to render, more simple to change, more maintainable.
And with XSLT you can *transform* your document and display it
everywhere, it's just a matter of time.
What about B2B ? UDDI is a wondeful idea, you don't have to search
Google, open the xyz site, register, buy, pay: just connect to the
server, find what you're searching and buy.
XML-RPC and SOAP are already used for distributed computing.
Jabber and OpenOffice already use XML as data format.
Definetly, I'd not call it a 'niche'.
Take a look at oasis-open.org for a different point of view, XML is not
just opentag->closetag :)

> I wonder if my pessimism toward XML is not unique. So I am writing here 
> to find if anyone else shares my thoughts (and has courage to admit it).

As you can see I'm an advocate <grin>
Of course after a lot of XML hacking (and studying)...
I also think that Python is wonderful for XML, an order of magnitude
better then Java and C#, so probaly its usage will grow consistently...
5:24 in the morning here in Italy, I'd better go to bed <g>


More information about the Python-list mailing list