XML is also more object based where most DBs are record based...
Where records are based on tables...
XML has more of a tree structure that can branch and include sub nodes...
XML by itself is just a text file similar to an html file...
What gives it it's power is the tools you use it with...
You can use DOM with programming languages to access the Object Model of the file where you can Read, Write, and modify any element in an XML file...
You can use XSL to transform an XML file into a different format, including Text files, HTML files, and other XML files...
XPath lets you access the elements as if they were directories on a computer... Which is supported by DOM and XSL...
There are several other tools you can use such as SOAP, XQuery, etc...
Or you can make your own parser, since it is just text...
Which raises another good point... XML is a TEXT format... so if anything happens to it, you can recover most of the data, where corrupt binary files can be seemingly imposible to recover...
In short...
Q:> So why would you want to use XML instead of just using a plain text file?
A:> Because it is simple, standardized, and has free and readily available tools to work with the data...
Note: XML is not a replacement for Data Bases...
It can be used to transfer data between DataBases, and can even be used for small databases, if you just need a quick solution...
But for large DBs, speed can be an issue for XML once it gets past a certain size, which varies depending on your system... Where databases are optimized to handle large tables...
I am still somewhat new to XML, but it is super easy to learn once you get the hang of it...
Your first comment reminds me of myself when I first heard of it...
I went out and bought a book or 2, then thought: "Why would I want to use this???"
3 or 4 books later (and with the help of
W3 Schools) I actually sat down and started to learn what all you can use it for... and the possibilities are ever growing...
I use XML with VB (via DOM) to create on the fly objects which can be manipulated and saved for loading at a later time, all with ease...
Visit My Site
PROGRAMMER:
Red-eyed, mumbling mammal capable of conversing with inanimate objects.