Parsing Nested XML file

  • Hi , 
    can someone please help me in getting the simple method of parsing the XML file in SSIS. I was using the XML source but it gives me bunch of 50-100 tables. is there a way of getting some examples of Script task paring XML file to Dataset or so .. Please find my attached XML file for your reference 
    Thanks in Advance

  • RamSteve - Saturday, December 22, 2018 7:04 AM

    Hi , 
    can someone please help me in getting the simple method of parsing the XML file in SSIS. I was using the XML source but it gives me bunch of 50-100 tables. is there a way of getting some examples of Script task paring XML file to Dataset or so .. Please find my attached XML file for your reference 
    Thanks in Advance

    Somehow the attachment isn't there, would help if it was 😉
    😎

    The problem with XML imports in SSIS is that the Integration services will "reverse engineer " the XSD, which produces nothing but some very funny results. My advice is to get the appropriate XSD to import into the SSIS XML task, "normalize" the structure using XQuery and T-SQL or, as a last resort, fully model the XML schema and create the matching DDL.

  • Eirikur Eiriksson - Saturday, December 22, 2018 8:05 AM

    RamSteve - Saturday, December 22, 2018 7:04 AM

    Hi , 
    can someone please help me in getting the simple method of parsing the XML file in SSIS. I was using the XML source but it gives me bunch of 50-100 tables. is there a way of getting some examples of Script task paring XML file to Dataset or so .. Please find my attached XML file for your reference 
    Thanks in Advance

    Somehow the attachment isn't there, would help if it was 😉
    😎

    The problem with XML imports in SSIS is that the Integration services will "reverse engineer " the XSD, which produces nothing but some very funny results. My advice is to get the appropriate XSD to import into the SSIS XML task, "normalize" the structure using XQuery and T-SQL or, as a last resort, fully model the XML schema and create the matching DDL.

    Attached the sample XML file

  • Steve Dell - Sunday, December 23, 2018 2:07 AM

    Eirikur Eiriksson - Saturday, December 22, 2018 8:05 AM

    RamSteve - Saturday, December 22, 2018 7:04 AM

    Hi , 
    can someone please help me in getting the simple method of parsing the XML file in SSIS. I was using the XML source but it gives me bunch of 50-100 tables. is there a way of getting some examples of Script task paring XML file to Dataset or so .. Please find my attached XML file for your reference 
    Thanks in Advance

    Somehow the attachment isn't there, would help if it was 😉
    😎

    The problem with XML imports in SSIS is that the Integration services will "reverse engineer " the XSD, which produces nothing but some very funny results. My advice is to get the appropriate XSD to import into the SSIS XML task, "normalize" the structure using XQuery and T-SQL or, as a last resort, fully model the XML schema and create the matching DDL.

    Attached the sample XML file

    This XML is rather complex and parsing it will take a considerable effort. My preference would be to use XQuery and the nodes() method for the work rather than SSIS as the it is similar effort but the results from the XQuery method is more manageable and  accurate.
    😎

    Two suggestions, use a diagram editor to model the XML and keep a "Master Data Management" in a spreadsheet, can save a lot of effort going forward.

  • Steve Dell - Saturday, December 22, 2018 7:04 AM

    Hi , 
    can someone please help me in getting the simple method of parsing the XML file in SSIS. I was using the XML source but it gives me bunch of 50-100 tables. is there a way of getting some examples of Script task paring XML file to Dataset or so .. Please find my attached XML file for your reference 
    Thanks in Advance

    I Guess this can be achieved by doing the XSL Transformation like DeNormalizing the XML file .Can some one help in creating the .XSL transformation for the attached XML file . Thanks in Advance 🙂

  • Steve Dell - Saturday, December 22, 2018 7:04 AM

    Hi , 
    can someone please help me in getting the simple method of parsing the XML file in SSIS. I was using the XML source but it gives me bunch of 50-100 tables. is there a way of getting some examples of Script task paring XML file to Dataset or so .. Please find my attached XML file for your reference 
    Thanks in Advance

    I have achieved this by parsing the XML file by using script task .In C# this can be done by using the XDocument and Linq which could be much easier

  • Steve Dell - Sunday, December 23, 2018 2:07 AM

    Eirikur Eiriksson - Saturday, December 22, 2018 8:05 AM

    RamSteve - Saturday, December 22, 2018 7:04 AM

    Hi , 
    can someone please help me in getting the simple method of parsing the XML file in SSIS. I was using the XML source but it gives me bunch of 50-100 tables. is there a way of getting some examples of Script task paring XML file to Dataset or so .. Please find my attached XML file for your reference 
    Thanks in Advance

    Somehow the attachment isn't there, would help if it was 😉
    😎

    The problem with XML imports in SSIS is that the Integration services will "reverse engineer " the XSD, which produces nothing but some very funny results. My advice is to get the appropriate XSD to import into the SSIS XML task, "normalize" the structure using XQuery and T-SQL or, as a last resort, fully model the XML schema and create the matching DDL.

    Attached the sample XML file

    So did you later detach the file?  I'm asking because I've checked your posts on this thread and none of them have an attachment.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 7 posts - 1 through 6 (of 6 total)

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