Extensible Markup Language (XML) is hot these days. XML is important, but you need to separate the useful elements of XML from the hype. I recently received a new CD-ROM from Microsoft that demonstrates what you can do with XML and other Microsoft technologies such as SQL Server, ADO, and some non-Microsoft tools. You can find the CD-ROM, "Microsoft Windows DNA XML Resource Kit".
One particularly intriguing aspect of XML is its use in the business tier as a mechanism for moving data. You can use XML to encapsulate your data, then send that data in one or more ways between systems or users. You just need an application on either end to put the data into XML format and an application to take the data out of XML format and convert it to the format you need (such as an ADO recordset or a SQL Server database).
Technologies such as ADO really help when they include features that let you automatically write and read data to and from XML. For example, you can use ADO 2.1 and higher to write an ADO recordset to the c:\temp\myfile.xml file by using this syntax:
You can recreate the ADO recordset later by using this syntax with the Open method:
ADO's XML features let you quickly read and write XML data. As a result, you can easily write applications that transport data from one place to another. For instance, a mainframe application could output data in XML format, then your Web or Visual Basic (VB) application could read that same file and automatically create an ADO recordset from it. The only catch is that the XML file format must be the format ADO expects, which I’ll discuss in a future article.
XML is here to stay. It’s powerful and you can integrate it into many applications. The trick is figuring out where and how to apply it in the most efficient manner for your application.