Projecting XML on the fly out of a DBMS is useful. With SQL Server 2000, the Microsoft way of providing this functionality depends on constructing a "Universal Table" out of a SELECT statement featuring the new FOR XML clause. For an overview of this functionality, start with the following links:
"Retrieving Dynamic XML from SQL Server 7.0 and 2000" http://www.15seconds.com/Issue/001102.htm
"Retrieving Result Sets into Streams" http://msdn.microsoft.com/library/psdk/sql/adoprg03_6coj.htm
"Using EXPLICIT Mode" http://msdn.microsoft.com/library/psdk/sql/ac_openxml_4y91.htm
"Guidelines for Using the FOR XML Clause" http://msdn.microsoft.com/library/psdk/sql/ac_openxml_0alh.htm