In the script task dump the output in a variable and direct the xml task to get the data from the variable and overwrite it after applying the xsl. Do you see how powerful the varibles are in SSIS, you can communicate between tasks using the variables. In the XMLSource set it so it gets the data from the variable. To generate the columns in the xmlsource keep some sample data in the variable and let the xmlsource generate the schema so that you can map the columns to the ado.net data source. If you dont do the sample data in the variable, it would be hard to map the columns.<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="no" />
<xsl:template match="/|comment()|processing-instruction()">
<xsl:copy>
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@*|node()" />
</xsl:element>
</xsl:template>
<xsl:template match="@*">
<xsl:attribute name="{local-name()}">
<xsl:value-of select="." />
</xsl:attribute>
</xsl:template>
</xsl:stylesheet>
References:
http://www.sidatkinson.com/post/Extracting-SharePoint-Data-using-SSIS.aspx
http://www.devx.com/dotnet/Article/35070/0/page/1
http://blogs.pointbridge.com/Blogs/matyas_ethan/Pages/Post.aspx?_ID=2
http://sqlblogcasts.com/blogs/drjohn/archive/2007/11/02/Getting-a-list-of-files-from-a-moss-document-library-using-a-SharePoint-web-service.aspx
http://sqlblogcasts.com/blogs/drjohn/archive/2007/11/03/ssis-calling-sharepoint-web-services-from-the-data-flow.aspx
No comments:
Post a Comment