<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Using XML Source</title><link>http://blogs.msdn.com/mattm/archive/2007/12/11/using-xml-source.aspx</link><description>Providing a generic way to extract data from XML documents of any format is pretty complicated. The SSIS XML Source Adapter tries to do just that, to various degrees of success. XML Source is easiest to use when your input has a simple element/sub-element</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>XML Source - Making things easier with XSLT</title><link>http://blogs.msdn.com/mattm/archive/2007/12/11/using-xml-source.aspx#6778613</link><pubDate>Sat, 15 Dec 2007 19:36:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:6778613</guid><dc:creator>SSIS Stuff</dc:creator><description>&lt;p&gt;As I wrote in my previous post , complex XML documents will produce multiple outputs when you're using&lt;/p&gt;
</description></item><item><title>re: Using XML Source</title><link>http://blogs.msdn.com/mattm/archive/2007/12/11/using-xml-source.aspx#7467002</link><pubDate>Tue, 05 Feb 2008 17:37:29 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:7467002</guid><dc:creator>SenthilS</dc:creator><description>&lt;p&gt;How it can done using vb macro? can u explain &lt;/p&gt;
</description></item><item><title>re: Using XML Source</title><link>http://blogs.msdn.com/mattm/archive/2007/12/11/using-xml-source.aspx#8010300</link><pubDate>Tue, 04 Mar 2008 00:32:51 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8010300</guid><dc:creator>jamiet</dc:creator><description>&lt;p&gt;Nice. I've never read this before. Shows how valuable a bit of out-of-the-box thinking can be.&lt;/p&gt;
&lt;p&gt;-Jamie&lt;/p&gt;</description></item><item><title>re: Using XML Source</title><link>http://blogs.msdn.com/mattm/archive/2007/12/11/using-xml-source.aspx#8452662</link><pubDate>Sat, 03 May 2008 03:02:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8452662</guid><dc:creator>kalcee</dc:creator><description>&lt;p&gt;hello there,&lt;/p&gt;
&lt;p&gt;Just as your example had 3 outputs, one of the XML I am working on produced 5 outputs. So I tried using multiple &amp;quot;merge and joins&amp;quot;. The outputs were merged fine, but when I try to give the outputs of the resultant merge and joins to the next one, en error shows up saying that &lt;/p&gt;
&lt;p&gt;&amp;quot;The IsSorted property must be set to true on both sources of this transformation&amp;quot;&lt;/p&gt;
&lt;p&gt;How do I set that on a merge and join transform ??&lt;/p&gt;
</description></item><item><title>re: Using XML Source</title><link>http://blogs.msdn.com/mattm/archive/2007/12/11/using-xml-source.aspx#8461653</link><pubDate>Tue, 06 May 2008 02:05:03 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8461653</guid><dc:creator>mmasson</dc:creator><description>&lt;p&gt;Hi Kalcee,&lt;/p&gt;
&lt;p&gt;Looks like you might have missed a step. Take a look at the step that starts with &amp;quot;Right click on the XML Source, and bring up the Advanced Editor&amp;quot; ... you can force the IsSorted property to true on the &amp;quot;Input and Output Properties&amp;quot; page.&lt;/p&gt;
&lt;p&gt;~Matt&lt;/p&gt;
</description></item><item><title>re: Using XML Source</title><link>http://blogs.msdn.com/mattm/archive/2007/12/11/using-xml-source.aspx#8527806</link><pubDate>Wed, 21 May 2008 15:12:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8527806</guid><dc:creator>Telly</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Great information, I can remove most of my manual sorts! &amp;nbsp;It will clear my task up a lot!&lt;/p&gt;
&lt;p&gt;Quick question though, in your XML you have your main tag with a 'date' attribute, taking a look at your list of record sets you don't have a extract set. &amp;nbsp;I've run into the same problem as the parent tag has values in which I need. &amp;nbsp;Do you know how to access this data?&lt;/p&gt;
&lt;p&gt;In my case it's for the report date, I need to know for which date the data in the XML is for, unfortunately the date is held within the main tag like in your example.&lt;/p&gt;
&lt;p&gt;&amp;lt;extract date=&amp;quot;2007-12-05&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;counters&amp;gt;&lt;/p&gt;
&lt;p&gt;The date is not accessible according to my SSIS&lt;/p&gt;
&lt;p&gt;Cheers&lt;/p&gt;
&lt;p&gt;Ian&lt;/p&gt;
</description></item><item><title>re: Using XML Source</title><link>http://blogs.msdn.com/mattm/archive/2007/12/11/using-xml-source.aspx#8541846</link><pubDate>Sat, 24 May 2008 00:51:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8541846</guid><dc:creator>mmasson</dc:creator><description>&lt;p&gt;Hi Ian,&lt;/p&gt;
&lt;p&gt;I noticed this too - it looks like our XML Source doesn't pick up attribute values from the root element. &lt;/p&gt;
&lt;p&gt;Your best bet is to massage the data bit with XSLT before processing. See my other post about this here:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/mattm/archive/2007/12/15/xml-source-making-things-easier-with-xslt.aspx"&gt;http://blogs.msdn.com/mattm/archive/2007/12/15/xml-source-making-things-easier-with-xslt.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;~Matt&lt;/p&gt;
</description></item><item><title>re: Using XML Source</title><link>http://blogs.msdn.com/mattm/archive/2007/12/11/using-xml-source.aspx#8602798</link><pubDate>Mon, 16 Jun 2008 06:19:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8602798</guid><dc:creator>KeelioSoftware</dc:creator><description>&lt;p&gt;As a side note to using XML as a source, there is an XML destination adapter for SSIS available at &lt;a rel="nofollow" target="_new" href="http://www.keelio.com"&gt;http://www.keelio.com&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>XML source and multiple data outputs for elements.</title><link>http://blogs.msdn.com/mattm/archive/2007/12/11/using-xml-source.aspx#9016084</link><pubDate>Sat, 25 Oct 2008 18:54:01 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9016084</guid><dc:creator>Gully Coder</dc:creator><description>&lt;p&gt;XML source and multiple data outputs for elements.&lt;/p&gt;
</description></item><item><title>re: Using XML Source</title><link>http://blogs.msdn.com/mattm/archive/2007/12/11/using-xml-source.aspx#9016432</link><pubDate>Sun, 26 Oct 2008 05:02:14 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9016432</guid><dc:creator>Arild - IMMIX</dc:creator><description>&lt;p&gt;Excellent! Looked all over to find a good and simple explanation of how to get the XML files into SQL Server&lt;/p&gt;
</description></item><item><title>re: Using XML Source</title><link>http://blogs.msdn.com/mattm/archive/2007/12/11/using-xml-source.aspx#9063413</link><pubDate>Wed, 12 Nov 2008 20:21:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9063413</guid><dc:creator>bre</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have a single XML file and I use your technique (great post by the way..). &lt;/p&gt;
&lt;p&gt;But my problem is that I have more that two outputs coming from my XML Source Adapter.&lt;/p&gt;
&lt;p&gt;How could I deal with this without having to &amp;quot;cascade&amp;quot; the merge join ?&lt;/p&gt;
&lt;p&gt;Any help is welcome.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
</description></item><item><title>re: Using XML Source</title><link>http://blogs.msdn.com/mattm/archive/2007/12/11/using-xml-source.aspx#9240035</link><pubDate>Fri, 19 Dec 2008 06:32:19 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9240035</guid><dc:creator>rperetz</dc:creator><description>&lt;p&gt;what if I don't want to merge all the data in one table, what if I want to have one to many tables with a FK key?&lt;/p&gt;
&lt;p&gt;I did get the keys generated from SSIS but they don't seem work give right relationship.&lt;/p&gt;
&lt;p&gt;for example I got a table called events which hold the callid and eventid and I was hoping it would have the relationship there, but nope.&lt;/p&gt;
&lt;p&gt;the ids don't match in both tables, in fact I can't even find the eventid that is linked to the callid...&lt;/p&gt;
&lt;p&gt;at this point I got my data mapped to my SQL tables fine, but with out a relationship. I can't tell how many events are for one call.&lt;/p&gt;
&lt;p&gt;I am about to re do everything using C# and xml objects to import the data. it's hard to believe that this could not be done in SSIS.&lt;/p&gt;
&lt;p&gt;please help.&lt;/p&gt;
&lt;p&gt;Here is the example of the xml I am working with&lt;/p&gt;
&lt;p&gt;- &amp;lt;calls&amp;gt;&lt;/p&gt;
&lt;p&gt;- &amp;lt;call id=&amp;quot;@BR8&amp;quot; callkey=&amp;quot;1&amp;quot; date=&amp;quot;09062008&amp;quot; acd=&amp;quot;0&amp;quot; starttime=&amp;quot;2118&amp;quot; endtime=&amp;quot;2181&amp;quot; type=&amp;quot;1&amp;quot; result=&amp;quot;1&amp;quot; from=&amp;quot;&amp;quot; to=&amp;quot;x82185 CUSTOMS&amp;quot; dnis=&amp;quot;2623&amp;quot; ansby=&amp;quot;x82185 CUSTOMS&amp;quot; requeues=&amp;quot;0&amp;quot; intf=&amp;quot;0&amp;quot; overflowed=&amp;quot;0&amp;quot; transfd=&amp;quot;0&amp;quot; held=&amp;quot;0&amp;quot; confd=&amp;quot;0&amp;quot; timetoabn=&amp;quot;0&amp;quot; timetoans=&amp;quot;6&amp;quot; tottalktm=&amp;quot;57&amp;quot; totconftm=&amp;quot;0&amp;quot; totholdtm=&amp;quot;0&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;- &amp;lt;events&amp;gt;&lt;/p&gt;
&lt;p&gt;- &amp;lt;event starttime=&amp;quot;2118&amp;quot; callkey=&amp;quot;1&amp;quot; endtime=&amp;quot;2118&amp;quot; type=&amp;quot;1&amp;quot; ani=&amp;quot;&amp;quot; dnis=&amp;quot;&amp;quot; digits=&amp;quot;82185&amp;quot; cause=&amp;quot;0&amp;quot; montd=&amp;quot;0&amp;quot; rqud=&amp;quot;0&amp;quot; intf=&amp;quot;0&amp;quot; overflowed=&amp;quot;0&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;trnk key=&amp;quot;default&amp;quot; id=&amp;quot;C04B20&amp;quot; name=&amp;quot;&amp;quot; nick=&amp;quot;&amp;quot; /&amp;gt; &lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/event&amp;gt;&lt;/p&gt;
&lt;p&gt;- &amp;lt;event starttime=&amp;quot;2118&amp;quot; callkey=&amp;quot;1&amp;quot; endtime=&amp;quot;2124&amp;quot; type=&amp;quot;2&amp;quot; ani=&amp;quot;&amp;quot; dnis=&amp;quot;2623&amp;quot; digits=&amp;quot;82185&amp;quot; cause=&amp;quot;22&amp;quot; montd=&amp;quot;0&amp;quot; rqud=&amp;quot;0&amp;quot; intf=&amp;quot;0&amp;quot; overflowed=&amp;quot;0&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;ext key=&amp;quot;slap&amp;quot; id=&amp;quot;82185&amp;quot; name=&amp;quot;CUSTOMS&amp;quot; nick=&amp;quot;&amp;quot; vport=&amp;quot;0&amp;quot; autoattend=&amp;quot;0&amp;quot; qcc=&amp;quot;0&amp;quot; /&amp;gt; &lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;ext key=&amp;quot;default&amp;quot; id=&amp;quot;82185&amp;quot; name=&amp;quot;CUSTOMS&amp;quot; nick=&amp;quot;&amp;quot; vport=&amp;quot;0&amp;quot; autoattend=&amp;quot;0&amp;quot; qcc=&amp;quot;0&amp;quot; /&amp;gt; &lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;trnk key=&amp;quot;from&amp;quot; id=&amp;quot;C04B20&amp;quot; name=&amp;quot;&amp;quot; nick=&amp;quot;&amp;quot; /&amp;gt; &lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/event&amp;gt;&lt;/p&gt;
&lt;p&gt;- &amp;lt;event starttime=&amp;quot;2124&amp;quot; callkey=&amp;quot;1&amp;quot; endtime=&amp;quot;2181&amp;quot; type=&amp;quot;3&amp;quot; ani=&amp;quot;&amp;quot; dnis=&amp;quot;2623&amp;quot; digits=&amp;quot;&amp;quot; cause=&amp;quot;0&amp;quot; montd=&amp;quot;0&amp;quot; rqud=&amp;quot;0&amp;quot; intf=&amp;quot;0&amp;quot; overflowed=&amp;quot;0&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;ext key=&amp;quot;slap&amp;quot; id=&amp;quot;82185&amp;quot; name=&amp;quot;CUSTOMS&amp;quot; nick=&amp;quot;&amp;quot; vport=&amp;quot;0&amp;quot; autoattend=&amp;quot;0&amp;quot; qcc=&amp;quot;0&amp;quot; /&amp;gt; &lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;ext key=&amp;quot;default&amp;quot; id=&amp;quot;82185&amp;quot; name=&amp;quot;CUSTOMS&amp;quot; nick=&amp;quot;&amp;quot; vport=&amp;quot;0&amp;quot; autoattend=&amp;quot;0&amp;quot; qcc=&amp;quot;0&amp;quot; /&amp;gt; &lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/event&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;event starttime=&amp;quot;2181&amp;quot; callkey=&amp;quot;1&amp;quot; endtime=&amp;quot;2182&amp;quot; type=&amp;quot;22&amp;quot; ani=&amp;quot;&amp;quot; dnis=&amp;quot;&amp;quot; digits=&amp;quot;&amp;quot; cause=&amp;quot;0&amp;quot; montd=&amp;quot;0&amp;quot; rqud=&amp;quot;0&amp;quot; intf=&amp;quot;0&amp;quot; overflowed=&amp;quot;0&amp;quot; /&amp;gt; &lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/events&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;lt;/call&amp;gt;&lt;/p&gt;
</description></item></channel></rss>