01-27-2004, 03:17 PM
I read many tutorial on XML and I understand XML (never use it though).
My question is, I don't know why use XML? What is the purpose of XML when I have a database like MySQL? Can you give me an example when explaining XML?
What is the purpose of XML when I have a database like MySQL
Well, suppose i have an Oracle database, and Billy Boy has an MS Server database, but we all would like to deliver content to 1 application. Well, then we need one format do deliver the data in. a 'middle tier' between each partys data-layer and the application-layer.
So we need this uniform, independent, format, and we need to know how to interpret the content that is delivered in that format. And that is exactly what schema's or dtd's do. So if each party can generate an XML file, according to a public DTD or schema, then you can start building applications that can take in data from whatever party, as long as they follow the DTD to structure the file.
I think something like XML is simply a necessity for databrokering.
For instance, there is a schema for the pharaceutical industry, so if you want to develop in that sector, you could set up a datacollector and you just ned to use the publi chema to know how to interprete all data that comes your way. Or if you want to distribute data, you know in which structure you need to supply it and the other (unknown) partys can all interpret it and get the data they are intrested in, out of your file.
A lott of messenger systems (not messages between persons, but between application) work like that : the message is sent as an XML file and each application uses the public schema to look for that part of the message that is relevant for his processes.
Another example of what XML can do even if you have a relational db like mySQL, are Data Islands (Currently only supported in IE) --> you run a select against the db and the returned recpordset is transformed in an XML file that can be included inside the webpage as a Data Island, or that can be used as an external datasource, for the webpage. You can then use this datacollection to do recordset paging, filtering, updating etc. All disconnected from the db. And then write the complete recordset back to the dataserver.
These are just a few limited illustration of your direct question. (XML as dataformat compaired to relational db's)
But there are a lott of other possible areas like SVG where XML will earn it's place as the technology that will keep all sorts of other technologies together.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.