The Role of XML
XML has become a hot buzzword in both database and Internet circles. Of course the big question you are probably asking yourself is, "Why should I care about XML?" The short answer is that XML is important because it provides a platform-independent mechanism for sharing heterogeneous data between applications via the Web. If you plan to create an application that will use data from heterogeneous sources -- including non-relational databases -- especially if it’s going to work on the Web, then you should take a look at XML.
There is a lot of confusion in many circles about what XML actually is, and its relationship with other markup languages, such as HTML or Standard Generalized Markup Language (SGML). Both HTML and XML are derived from SGML. HTML, as you probably know, is the markup language of the Web. A Web server sends HTML text to a browser, which renders the tag languages into the page you see. If you ever want to see what HTML looks like, select your browser option to view the source of the page you’re reading. The problem with HTML is that its definition is fixed and there is no mechanism for developers to extend it to support additional features, such as relational data structures.
This is the problem that XML is designed to solve. XML stands for eXtensible Markup Language. It is a metalanguage specification published by the XML Working Group, which is a project of the World Wide Web Consortium (W3W, www.w3.org).
Whereas HTML is limited to the display of Web pages, XML allows you to create your own markup tags, hence the term extensible. One big advantage of XML is that it enables Web developers to create more flexible applications, including support for data structures from heterogeneous databases. XML can also be used to create domain-specific languages based on the concept of Document Type Definition (DTD), which is how a developer specifies the structure of the XML document. A DTD file is used by the XML parser to understand the content and context of the structures within the XML file. Tools can be constructed that are compatible with XML, such as style sheets, browsers, search engines, and certain types of databases. In fact, several database manufacturers have announced support for XML, including Object Design and IBM Corp.
Where will you use XML? Probably the most important use of XML will be in e-business applications. The ability to create and extend XML to support any data type from a wide range of databases and applications will allow XML to displace electronic data interchange (EDI) for electronic commerce applications. EDI applications are used to exchange structured documents across a private network. These documents can be purchase orders, inventories or shipping instructions. Since XML can be used to create these types of documents, and can be designed to work closely with HTML in a Web environment, it is natural that these two technologies will increasingly be used for business-to-business transactions. For example, XML can be used to build a front-end banking application that can receive a stream of text from a remote system and parse that text into instructions to perform a deposit or withdrawal. This capability is simply beyond the ability of a simple HTML program.
The limitations of XML are relatively few. One issue is that XML is fairly new and evolving, so developers should pay close attention to the activities of the XML group. Since so many vendors are jumping on the XML bandwagon, there are implementation consistency issues between the various XML parsers to look out for. Browser support for XML is still late, but Microsoft and Netscape are expected to release browsers this year that will support most XML features.
One consideration is that XML doesn’t support an AND operator. This means that your XML documents are relatively fixed in their structure. For example, you can’t create a page with data items listed in an arbitrary order. The XML structure will expect to see them in a specific order. On the whole, however, if you’re considering creating a Web-based application that will use structured text, then you should definitely consider using XML.
The bottom line is that if you’re looking to create an application for the Web that needs to send, retrieve and display heterogeneous data within a browser context, XML is a technology you should be evaluating. --Robert Craig is vice president of marketing at WebXi Inc. (Burlington, Mass.), and a former director at the Hurwitz Group Inc. Contact him at firstname.lastname@example.org or via the Web at www.webxi.com.