I have a process where I create XML files from a table using the FOR XML EXPLICIT command. I then write the output to a text file using the sp_makewebtask command which incorporates a template file. This is all good and fine, but since I recently upgraded my SQL server to 2008, the sp_makewebtask procedure is no longer supported.
Since I can no longer use sp_makewebtask I need to know what I should use to create the XML output in the text file. The template file that I am using with sp_makewebtask is as follows:
<?xml version="1.0" encoding="UTF-8"?>
Getting the XML output from the table is not hard with FOR XML EXPLICIT, the problem I am having is with the first two lines as well as the last line of the text file. I am thinking that there must be some type of template that can be created to set up the document and then some command to write the detail to the document. This is what the sp_makewebtask command did.
Any help is appreciated.