Resource Name:

Using XSLT to Create BCP CSV and Format Files

 

Resource Desc:

This example demonstrates using XSLT to output text files (as opposed to the usual HTML or XML files). Assume we have been given the following set of XML records and their schema and wish to store them in a database. Most relational databases support some kind of text-based import utility for just this purpose. In this example, we will transform the above XML files into two data files suitable for use with Microsoft SQL Server's command-line BCP (Bulk Copy Program) utility. We will have to convert the input XML into a comma-delimited DAT file, and an input XML schema into a space-delimited FMT file.

 

Resource URL:

http://www.codenotes.com/articles/articleAction.aspx?articleID=172

 

Rating: 8.00

 

# Times Viewed: 2421

 

Reviews
3/23/2005 11:25:49 AM I found this article very useful for creating an XSLT to generate text files and CSV files. A++