<root id="8391">
<event>
<title>Christmas Event 2008</title>
<description>Again we are looking forward to a busy christmas
period...</description>
<keyword>Christmas</keyword>
<keyword>Event</keyword>
<location id="344" level="city">
<name>London</name>
<address>541 Wigram Lane</address>
<parent-location id="222" level="Country">
<name>England</name>
<parent-location id="444" level="Subcontinent">
<name>United Kingdom</name>
</parent-location>
</parent-location>
</location>
</event>
</root>
I need to 'flatten' the above so I am passing the information to a stored
procedure as follows (note concatenations on description, keywords and
locations):
@Title = "Christmas Event 2008"
@Description = "Christmas Event 2008<br><br>
Again we are looking forward to a busy christmas period...<br><br>
Address: 541 Wigram Lane<br><br>
London"
@Keywords = Christmas, Event (i.e. need to concatenate the two keyword nodes)
@Locations = London, England, United Kingdom (i.e. need to concatenate the
multiple location & parent-location nodes)
Can anyone help me get started on the best way to approach the 'flattening' I'm not sure which SSIS toolbox items to use - new to SSIS. Especially for traversing the 'child' data (keywords, location).
Today I was playing around with using a script component and the processinput event, looping through all the records for keyword and location and concatenating, I was them attempting to pass to a package level variable, thinking I could add the variable values to an output on my core dataset. That was all good, except my variable doesn't get set. Apparently variables can only be set on the postexecute event - unfortunately this event is not firing.
I suppose my question(s) to everyone out there are:
1. Am I heading down the right track to use script component to concatenate
multiple rows into variables?
2. Or is there a better method i.e. would XSLT be more suited to this task
i.e. Use an xml task to apply the xslt, then pass to xml source, etc?
Thanks


