Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: XML file, embedded collections processing

  1. #1
    Join Date
    May 2010
    Posts
    16

    Default XML file, embedded collections processing

    Hi All!
    is there a way to process embedded collections from an xml file?

    My use case is that I have an XML file with the following structure:

    collection1
    collectionItem1
    collectionItem2
    subcollection
    subcollectionItem1
    subcollectionItem2

    I need to generate a row for each item of the second collection including the elements from the first collection.

    I was thinking about chaining Get data from XML steps...but that step removes XML from values.

  2. #2
    Join Date
    Sep 2009
    Posts
    810

    Default

    Hi there,
    would you like to post a small example file with that structure? I'd try to figure something out.

    Cheers

    Slawo

  3. #3
    Join Date
    May 2010
    Posts
    16

    Default

    I need to loop on InvestmentVehicle for its ID and other nodes not shown here. AND I also need to loop on the FundSERVFeeDetail

    Right now Im trying to have one XML input step to loop on InvestmentVehicle
    and another one to loop on FundSERVFeeDetail. Only thing not working with this is I cant get the investmentVehicle ID attribute from my FundSERVFeeDetail loop.


    heres a sample:
    Code:
    <PackageBody>
    <InvestmentVehicle_Id="F0CAN05MIO">
           <InvestmentVehicleName>Canada Life Global Equity (F) Gens</InvestmentVehicleName>
           <Operation>
              <FundSERVFee>
                  <FundSERVFeeDetail>
                      <Name>Name 1</Name>
                      <Code>The Code 1</Code>
                  </FundSERVFeeDetail>
              </FundSERVFee>
           </Operation>
    </InvestmentVehicle>
    
    
    <InvestmentVehicle_Id="F0CAN05MIP">
        <InvestmentVehicleName>Canada Life Global Equity (FDC) Gens</InvestmentVehicleName>
    
           <Operation>
              <FundSERVFee>
                  <FundSERVFeeDetail>
                      <Name>Name 2</Name>
                      <Code>The Code 2</Code>
                  </FundSERVFeeDetail>
              </FundSERVFee>
           </Operation>
    </InvestmentVehicle>
    
    </PackageBody>

  4. #4
    Join Date
    Sep 2009
    Posts
    810

    Default

    Hi there,

    I attached a sample that might do what you need.

    Cheers

    Slawo
    Attached Files Attached Files

  5. #5
    Join Date
    May 2010
    Posts
    16

    Default

    Works perfectly! Thanks for your quick help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.