For Each Loop for XML Task

  • I'm having a big issue as far as using an XML task inside of a for each loop container. Here is the situation I'm using an XML task to transform an .xml file into a .txt file using an .xsl stylesheet; but since many files can show up in in the folder that I'm getting the .xml files from (dynamically changing per job run) i have to use a for each loop container to look for this possible situation. Can anyone show or point me towards a good direction of where I can get more clarification on how to do all this in the for each loop container, I think that I'm about 80% there but I think I lost in how and where to call the variables. Please put the explanation in terms where its easy to understand so thats its easy to follow 🙂 thanks in advance for your help guys!!!

  • This tutorial should confirm you're on the right track...and may get you closer to finishing that last 20%.

    http://www.sqlshare.com/looping-through-and-loading-files-with-ssis_34.aspx

    If you need more assistance go ahead and zip your SSIS package and attach it to this thread with your questions and we'll go from there.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • Thanks for the video, it was quite helpful when using it for other situations; but in short i'm still having the same problem. The issue is with the xml file being enumerated using an xml task. If you like i'll zip and send you a copy of the test xml files as well as the xsl file that i'm using to transform the xml file. PM me your email and i'll send you the ssis package. furthermore i have researched this issue online and found that there is a workaround, but i can't get the workaround to work (http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server-dts/9376/SSIS-Problem-with-Foreach-Loop-and-XML-Task) any help with this issue would be much appreciated.

Viewing 3 posts - 1 through 2 (of 2 total)

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