none
xsl to read connection manager from dtsx file

    Question

  • for documentation purpose, is there a XSL file or how do you extract many data source name, user name etc.?
    Thursday, August 30, 2012 4:19 PM

Answers

  • DotNetMonster has provided you a stylesheet which can be the template of XML document.

    I provide you an example - http://simonlv.blogspot.com/2012/08/ssis-step-by-step-6-use-xslt-to.html , it can help you understand the work flow.

    Configurations as below:

    CH04-DEMO02-XMLTask.dtsx is the package path which you want to know how many connections it has.

    ConnectionManager.xml is the output file which will contain the connection information.

    ConnectionManager.xslt is the stylesheet which tells XML task: Please transfer the source XML document (CH04-DEMO02-XMLTask.dtsx) to my target XML document (ConnectionManager.xml) according to my style (ConnectionManager.xslt)

    Note: Copy the stylesheet DotNetMonster provide you and save it to ConnectionManager.xslt

    Run package and show my test result to you:

    When you finish this demo, you can analyze the package XML file and write your stylesheet to extract the information you want. Stylesheet can be HTML format and also can be XML format. 


    Please vote if it's helpful and mark it as an answer!


    • Edited by BIWORKMVP Friday, August 31, 2012 8:44 AM
    • Marked as answer by Eileen Zhao Thursday, September 6, 2012 9:18 AM
    Friday, August 31, 2012 8:43 AM

All replies

  • Do you want to extract the data source info off a package (which is a XML) file?

    Arthur My Blog

    Thursday, August 30, 2012 4:21 PM
    Moderator
  • for documentation purpose, is there a XSL file or how do you extract many data source name, user name etc.?

    AFAIK, there isn't any. here is something that can get you started though:

    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:DTS="www.microsoft.com/SqlServer/Dts">
      <xsl:template match="/DTS:Executable" name="ssisconnections">
        <html>
          <body>
            <xsl:for-each select="./DTS:ConnectionManager">
              <strong>Object Name: </strong>
              <xsl:value-of select="./DTS:Property[@DTS:Name='ObjectName']"/>
              <br />
              <strong>ConnectionString: </strong>
              <xsl:value-of select="./DTS:ObjectData/DTS:ConnectionManager/DTS:Property[@DTS:Name='ConnectionString']"/>
              <br />
              <br />
            </xsl:for-each>
          </body>
        </html>
      </xsl:template>
    </xsl:stylesheet>

    Hope this helps-


    Please mark the post as answered if it answers your question

    Thursday, August 30, 2012 7:14 PM
  • DotNetMonster has provided you a stylesheet which can be the template of XML document.

    I provide you an example - http://simonlv.blogspot.com/2012/08/ssis-step-by-step-6-use-xslt-to.html , it can help you understand the work flow.

    Configurations as below:

    CH04-DEMO02-XMLTask.dtsx is the package path which you want to know how many connections it has.

    ConnectionManager.xml is the output file which will contain the connection information.

    ConnectionManager.xslt is the stylesheet which tells XML task: Please transfer the source XML document (CH04-DEMO02-XMLTask.dtsx) to my target XML document (ConnectionManager.xml) according to my style (ConnectionManager.xslt)

    Note: Copy the stylesheet DotNetMonster provide you and save it to ConnectionManager.xslt

    Run package and show my test result to you:

    When you finish this demo, you can analyze the package XML file and write your stylesheet to extract the information you want. Stylesheet can be HTML format and also can be XML format. 


    Please vote if it's helpful and mark it as an answer!


    • Edited by BIWORKMVP Friday, August 31, 2012 8:44 AM
    • Marked as answer by Eileen Zhao Thursday, September 6, 2012 9:18 AM
    Friday, August 31, 2012 8:43 AM