Paul said:
I'm not clear what XML does that an SQL database doesn't do with
server side scripting. Maybe that it contains it's own scripting so the
database can be queried without stressing the server's machinery?
XML and SQL are completely different kettles of fish.
Asking "should I write my page using XML or an SQL database?" is a bit
like asking "should I write my page in HTML or Swedish?".
It is possible to write a page in HTML *and* Swedish, or HTML but not
Swedish, or Swedish but not HTML, or neither.
XML is a universal generic method of representing and structuring data. It
doesn't *do* or *mean* anything on its own. You build formats and
applications on top of it. XML is "the new binary"[1].
SQL is a language for querying databases. If you ask a database "give me a
list of all my clients called 'Henry' and let me know their phone numbers
too" it won't know what you're talking about, because it can't understand
our natural language. You need a more structured language... a structured
language for querying the database... perhaps this one called Structured
Query Language (SQL)?
So you ask:
SELECT firstname,lastname,phone FROM clients WHERE firstname='Henry';
And your database gives you what you want.
We can easily combine the two technologies. For example, we could whip up
a script to perform an SQL query on a database and then format the
resulting data in XML. An example XML response from the above query might
be:
<clientlist>
<client>
<name><first>Henry</first><sur>Mancini</sur></name>
<contact method="tel">020 8812 3456</contact>
</client>
<client>
<name><first>Henry</first><sur>Kissenger</sur></name>
<contact method="tel">020 7865 4321</contact>
</client>
</clientlist>
[1] By that, I don't mean that it has to do with 1s and 0s: just that it
is simply a way of representing blobs of data without caring what the data
is. Once you have this way of storing and reading blobs of data, you can
build useful stuff on top of it: image formats, audio formats, text,
whatever.