How do i use variable source type in XML task inside a for each loop in ssis package?

  • I am trying to use for each loop in ssis, with an xml task inside( to convert xml using XSLT transformation), I am able to pass in the variable to for each loop and read it, but when I provide SOURCETYPE in XML task as variable and provide the variable(which is carrying the value in the loop), the xml task is not able to take the source. IT is returning the following error.

    Error: 0xC002F304 at XML Task, XML Task: An error occurred with the following error message: "Data at the root level is invalid. Line 1, position 1.".

    Error: 0xC002928F at XML Task, XML Task: Property "New Source" has no source Xml text; Xml Text is either invalid, null or empty string.

    Task failed: XML Task

    The xml task is working for individual files and giving output.

    I tried removing the xml task from loop and see whether the variable is actually carrying the value, it is doing it perfect.

    My XML task takes in an input xml file and use XSLT to transform the file and return the modified XML

    What I am trying to do is, create a SSIS package so that it can loop through a folder with incoming xml files and convert them using XSLT transformation and write them to another folder.

    I tried all the options available (at least those I could find, like keeping the source type as file connection and making connection manager as variable name, but that is not working, or at least for me, it is still giving the same error )

    Any ideas or any guidance to a proper source or any further explanations would be greatly appreciated.

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply