Server|xml
Import XML "Target=_blank>xml file"
(feeds by Microsoft SQL Server Development Group, questions@sqlmag.com)
Q: How do I import an XML "Target=_blank>xml file" into SQL Server 2000?
A: You can import the XML target=_blank>xml file into SQL Server 2000 in three different ways. Here are some of these methods.
If you want to extract the entity and attributes of a document into a related table, the quickest way to import the XML target=_blank>xml file into SQL Server is to use SQL Server Web release (SQLXML) target=_b Lank>xml) 3.0 The Bulk Load COM interface in Service Pack 1 (SP1). The interface is available with free SQLXML "Target=_blank>xml Downloads:
This XML "Target=_blank>xml import method is very rapid, and this download provides a bulk load tool in the form of a code example."
You can use the Textcopy.exe command-line utility if you do not want to extract the entity and attributes of the document into the related tables. Using Textcopy.exe is a good way to load a document into a text data type column.
If your XML document is simple, you can use Data Transformation Services (DTS) by writing transformation code that looks at the various lines of the XML document and extracts the information into the table. This method requires that you define an XML file as an input data source, define a database table as an output data source, and write an ActiveX script to parse the input of the "<" and ">" characters to extract the entities, attributes, and their values.