Thread: XML, uses?
View Single Post
09-17-2004, 04:17 PM
#11
Salathe is offline Salathe
Salathe's Avatar
Status: Community Archaeologist
Join date: Jul 2004
Location: Scotland
Expertise: Software Development
Software: vim, PHP
 
Posts: 3,820
iTrader: 25 / 100%
 

Salathe will become famous soon enough

Send a message via MSN to Salathe

  Old

Exactly Anthony, XML is (and will only be) structured data. It is not intended to replace HTML (XHTML), databases, and so on as they each have their own way of working. XML can simply be seen as another way of representing data.

Originally Posted by Travis
Personally I dont see the point in having your news in an xml file, it would be easyier to store it in a database such as mysql.
It would be easier (and arguably a much better option) to store your data in a database. Then if you want to use the data in a way which enables other people (read: machines) to be able to read and understand your data, you can query the database using your preferred language (php+mysql, asp+mssql, etc) and output the results as XML for those people to use. A very good way in which this works, and one you should be familiar with, is that of syndicating news or blog data.

How the various posts are stored varies from blog to blog; some use flat-file databases (text files on the server), others use MySQL, etc. However, if the data is recalled from that database (whichever form it takes) using your preferred (or most hated) language and output as XML then it can be read by any remote machine that takes an interest. Obviously you can choose to only output some data (eg. not displaying senstitive data, or an entire database) for others to read. Without broadcasting your XML like this, two courses would have previously had to have been followed. You would either have had to push your data to any interested third parties which often causes incompatibility problems (you use MySQL, the third party uses some other database), or you would have to give third parties access to your database server (!!) in order to let them share your data. I'm sure you can see why a new way to structure data to allow it to be shared was called for.

Anyway, this post is rambling so I'll get off my high horse now.

Cheers,
Salathe :we-need-a-cyclops-smiley: