日期:2008-07-23  浏览次数:20493 次

In the current age of technology, with all of the cool toys and gadgets that are available, all of these things exist for one purpose...to allow us to more easily access information. Today, we are able to acquire information more quickly and easily than we has ever been possible in the past. Largely, this has to do with the internet and the fact that you can access information anywhere in the world from anywhere else in the world in literally the blink of an eye.

So we all know that the information is there, waiting for us to access it. The challenge we as developers face is how to get that information to the user. Up to this point, the information has largely been sitting in static HTML pages, just waiting to be read. The problem with this is that there is more work involved in changing or updating that information as the editor has to know HTML, CSS, etc. So recently, more and more information has moved from static pages to being stored in some "data repository". The most common is the relational database. The great thing about this is that the data is kept seperate from the layout, so you can change the data without having to deal with design issues. All you need is to have a server-side scripting environment (i.e., ColdFusion, ASP, PHP, CGI, etc.) to extract the information from the database and display it for the user in HTML format. This is a wonderful system, however, since each relational database management system (RDBMS) is proprietary to a degree, it can require quite a bit of work for different databases to communicate with each other (plus you need to know the different server-side languages to deal with all of this, along with SQL). Wouldn't it be nice if there was a standard way of transferring information that was platform and language independent?

Enter eXtensible Markup Language (XML). XML is a buzzword that has been thrown around a lot lately and for good reason. XML has been positioned as the STANDARDIZED way to transfer information that has been recommended by the W3C. This means that any application can potentially communicate with any other application as long as they communicate via this language. In a way, it's kind of like the Universal Translator they have in Star Trek. Each species speaks a different language, but that language can be transmitted via the translator in a way that each party can understand the others as long as the translator has the algorithms necessary to make sense of that language. This is the entire premise behind Web Services, which you will be hearing a lot about in the future.

Essentially, XML is a way to describe information in a structured way, that is human readable. Though I will go into a very brief explanation of XML, for more detailed information, here are a few Excellent resources discussing XML:

» A technical introduction to XML
» XML - Questions and answers
» An introduction to the Extensible Markup Language

XML is strictly a language that DESCRIBES the information itself, unlike HTML which describes how the information should appear in a web browser. XML makes use of tags, just like HTML, however, the tags are used as descriptors of the data itself, instead of how the data should be laid out on a page. Thus, the person writing the XML is allowed to make up his/her own tag names and structure those tags in a way that gives context to the information contained within them. Here is a simple HTML element consisting of tags:

<p>Phil Chung</p>

This code tells me that the browser should display "Phil Chung" as an individual paragraph, but tells me nothing about whether "Phil Chung" is the name of a Flash developer, a flesh-eating disease, or a clothing manufacturer. Take a loo