trying to reduce xml file size by using ssis xml task xpath to extract only required information but got a problem

  • I used ssis xml task

    My input file has the following format

    <enterprise>

    <person>

    <sourcedid>

    <source>111111</source>

    <id>22222</id>

    </sourcedid>

    <name>

    <fn>xxxxxxx</fn>

    <n>

    <family>yyyyy</family>

    <given>zzzzzz</given>

    </n>

    </name>

    <demographics>

    <gender>2</gender>

    </demographics>

    <email>xxxxxx@fffff.edu</email>

    <adr>

    <street>cccccc</street>

    <locality>ccccc</locality>

    <region>cccc</region>

    <pcode>ccccccc</pcode>

    </adr>

    <academics>

    <academicmajor>gggggg</academicmajor>

    <customrole>hhhhhh</customrole>

    <customrole>dddddd</customrole>

    <customrole>cccccc</customrole>

    </academics>

    </person>

    <person>

    </person>

    </enterprise>

    The output I got is in the form of

    <resultsetnode>

    <fn>xxxx</fn>

    <family>yyyy</family>

    <email>zzzz</email>

    <customrole>xxxxx</customrole>

    <customrole>zzz</customrole>

    <customrole>kkkkkk</customrole>

    <fn>aaaa</fn>

    <family>bbbb</family>

    <email>cccc</email>

    <customrole>dddddd</customrole>

    <customrole>eeee</customrole>

    <customrole>wwwww</customrole>

    </resultsetnode>

    I want the output to be in the form of

    <resultsetnode>

    <person>

    <fn>xxxx</fn>

    <family>yyyy</family>

    <email>zzzz</email>

    <customrole>xxxxx</customrole>

    <customrole>zzz</customrole>

    <customrole>kkkkkk</customrole>

    </person>

    <person>

    <fn>aaaa</fn>

    <family>bbbb</family>

    <email>cccc</email>

    <customrole>dddddd</customrole>

    <customrole>eeee</customrole>

    <customrole>wwwww</customrole>

    </person>

    </resultsetnode>

    How can I achieve that

    thanks for your help in advance

  • Since this is your third thread regarding this issue I recommend you include the reference to thos threads so you wouldn't have to deal with solutions that would not consider your file size (>2Gb)...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

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

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