I would like to point out my view on XML.
What happens today if you want to make a data format or document that needs to be read by multiple systems (= differences in hardware or software, it doesn't matter as long as they're different from eachother). You would decide on a certain way of storing your data and then have to adapt these systems to correctly interprete the document. This is often very difficult or even impossible and would often require source code and recompilation (I'm not even getting started about the hardware problems such as the big endian & little endian issue). The industry had to come up with a solution that was interpretable by almost any system and this meant using plain text. That way this solution (XML) is editable and viewable in any plain text editor, and this would be impossible with a binary format.
Then came the issue of how we're going to recognize certain data between other characters. For this part of XML, they used a subset of a standard that's around for almost 30 years, called SGML. They threw away the bits of SGML that weren't really worth their salt and created the XML 1.0 specification available at
www.w3c.org. SGML and XML are not a language to encode data in a text-document, but they are meta-languages. This means: with XML you define a language for the specific purpose you want to achieve (and create whatever elements you need). Examples of such a language, defined by XML, are MathML and XHTML (The XML specification of HTML 4.0).
Well, I've given quite an extensive explanation about what exactly XML is, but maybe you're wondering why we need it.
XML is a way of making you're stored data available to programs other than the parent app that created the file in the first place. This can be done by adapting a system to understand XML or (if the legacy system cannot be changed) by using a separate XML parser that outputs a data format that the legacy system can understand.
In conjunction with databases, XML serves a rather subjective role. When you're data is resting on a system (i mean not moving through different architectures or needed by any program that doesn't understand a DB resultset) you should use whatever DB you use and handle you're data through SQL. But whenever you want to exchange data with some other source (like a file or other database) you're better off first converting to XML and then importing it in you're DB. (I know, the big databases often provide some function to import different data formats, but in the real world the one you need is often just not in the list and you're glad you can import XML).
Well I could go on like this forever but it's probably better if anyone with an XML question just posts it here and I'll try to give you my 2 cents about the solution.
Anyway raja, hope I could help you out. If not let me know too
-------------------------
Raf Van de Plas
The Angry Belgian