question

BobbyP-1695 avatar image
0 Votes"
BobbyP-1695 asked YitzhakKhabinsky-0887 commented

XML Task using Foreach Loop Container FileName

We have a Control Flow XML Task which utilizes a XSLT Style Sheet to transform an aggregate list of .xml files. The aggregate list of .xml files is presented and coordinated by a Foreach Loop Container storing the collection into Variable Mapping User::FileName

We are wondering how then the array of values User::FileName from the Foreach Loop Container is presented within the XML Task? Through Input/SourceType = Variable and Source = User::FileName?

Do you have any examples of this you can show? YouTube? Maybe some insight as to how to build the Style Sheet.

This is all new to me...just trying to figure this out

sql-server-integration-services
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@BobbyP-1695,

Please add to your question:

  • Input XML sample

  • Desired output, post XSLT transformation.

0 Votes 0 ·

1 Answer

ZoeHui-MSFT avatar image
0 Votes"
ZoeHui-MSFT answered

Hi @BobbyP-1695,

Setting source type=variable means the XML task expects your variable to contain literal XML, not a file name. I think you'll want to keep the source type = file connection, but use a property expression on your Connection Manager to set it's connection string to @[User::XMLLoadFile].

As said here.

Details you may also refer this for the steps.

Regards,

Zoe


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Hot issues October



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.