You may already understand what XML is all about, and you may be interested in how to use XML in existing applications or how to develop new ones that can easily be deployed in your environment. This article explains how you can use your existing Web infrastructure for such applications. Even though we demonstrate the technique using Active Server Pages (ASP), the logic could as easily be employed for a Java, Perl, or PHP application. It is assumed that the reader can understand the ASP code, which has been extensively commented at each step of the script. The example script demonstrates the capability to create XML documents from data posted using HTML forms. The XML documents are saved in a file on the file system.
The adoption of XML as a standard interface for conducting business transactions is a fundamental shift in our approach to interact and share data between different organizations and systems. Instead of organizations sharing their data in a delimited file format using EDI or any of the plethora of communication pipes, the pervasiveness of the Web and the acceptance of XML as a language to describe data has made it an essential part of the IT infrastructure. Similarly, although the Web provides us with a simple way to interact with information resources from around the world, the organization and the classification of data when marked up in HTML makes it difficult to search for relevant information. XML's capability to describe the data in a human- and machine-readable format makes it very effective to bridge the boundaries of environments, formats, organizations, and time. Loosely coupled systems that understand each other's data can exchange transaction information by applying suitable transformations to the stream of XML data that they exchange with each other. The added flexibility of using XSL to transform the XML data from one format to another obviates the need to write hard-coded adapters.