Although XML is still changing and being applied in new ways, you can put it to work today in order to build document exchange applications with VB, COM, and MSXML.
To anyone who has paid attention over the past year, it should come as no surprise to you that XML is now the lingua franca of corporate computing. In fact, according to recent Microsoft pronouncements at Tech Ed and other events, Microsoft's current focus is to "XML-enable" all of its products. As a result, the plethora of Microsoft server products being released this fall —including Exchange 2000, SQL Server 2000, and BizTalk Server 2000, among others—will incorporate XML as a native format. In addition, sneak peaks at Visual Studio .NET (which includes Visual Basic 7 and technologies such as ADO+ and ASPindicate that Microsoft development tools will use XML to communicate with services that are exposed by Web servers.
Although this excitement can easily lead to a situation in which your boss simply wants you to incorporate XML into your current projects as a result of the hype, XML is not a passing fad. Its self-describing capability and cross-platform format render it useful in a number of problem domains. This article provides one example of how you can utilize XML by leveraging your knowledge of VB and COM with tools that are available today.
To put them in perspective, let's review the current, primary uses of XML:
To transport data from Web servers to browsers, for display and updating—MSIE 5.0 introduced the concept of XML data islands for directly incorporating data within pages. Techniques that use XSL style sheets to transform XML and incorporate it with HTML for the creation of Web interfaces are also common. A subset of these scenarios uses XML as the interprocess data format for middle-tier components and database servers. The XML support in ADO 2.5 encourages this, and SQL Server 2000 includes a simple FOR XML SQL extension to return XML directly from the database server, using ADO 2.6.
As a tool for describing metadata in a variety of scenarios—The original IE Channel Definition Format (CDF) is an example of a technology that used XML to describe the data about channels and their properties. More recently, Microsoft released the SOAP Toolkit for VB 6.0, which uses XML to specify the metadata for components that are exposed by a Web server. For example, SOAP specifies how clients can view type information about components, how clients format method calls to the server, and how the return data from the components is packaged for the client. The toolkit enables you to call SOAP services from VB applications, and to expose your VB components as Web services. You can download the toolkit at msdn.Microsoft.com/xml/general/toolkit_intro.asp
As a document exchange format—In this scenario, businesses define XML schemas for various business transactions, and subsequently exchange data in XML documents based on these schemas, to do everything from purchasing to inventory management. Microsoft's BizTalk initiative aims at providing a clearinghouse for schemas; BizTalk Server 2000 will also provide a server service and development tools to exchange documents, manage how those documents are interpreted and routed, and take action when they are received. See www.biztalk.org for more information. The use of XML in document exchange applications between business partners is perhaps the most natural and powerful use of XML.
Although it would be nice if BizTalk Server were a shipping product, you can still use XML to simplify the exchange of data if you're willing to build some of the infrastructure yourself. (If you don't mind working with prerelease code and are on Windows 2000, you'll also want to check out the BizTalk Technology Preview, which also includes some of the infrastructure that is used to create document exchange applications.) The remainder of this article discusses a technique used in a real-world application to implement such a scenario at a data collection company. For those readers who need to get up to speed on XML basics, see http://msdn.microsoft.com/workshop/xml/general/xmlfaq.asp