Customer Portal

Problem Writting output xml to a file in Cloveretl

Comments 2

  • Avatar
    avackova
    0
    Comment actions Permalink
    Hello,
    can you show your graph?
  • Avatar
    twaller
    0
    Comment actions Permalink
    Hello Karan,

    You can get the desired output:

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <TranxRequest>
    <NetworkID>50427</NetworkID>
    <Details>
    <CustomerName>XXXX</CustomerName>
    <CustomerID>YYYY</CustomerID>
    </Details>
    <Details>
    <CustomerName>aaaaa</CustomerName>
    <CustomerID>asasada</CustomerID>
    </Details>
    </TranxRequest>


    with the following mapping:

    <Mapping element="TranxRequest" inPort="0">
    <Mapping element="Details" inPort="1" key="NetworkID" parentKey="NetworkID" fieldsIgnore="NetworkID"/>
    </Mapping>


    In other words:

    You need to have two edges, the first will contain only the NetworkID values, the second will contain NetworkID, CustomerName, and CustomerID values.

    The values from both edges will be joined using parentKey="NetworkID", but the NetworkID value from the second edge will be hidden by specifying fieldsIgnore="NetworkID".

    And, you also need to set useRootElement="false" (simply uncheck the default true value of the Use root element attribute.

    Best regards,

Please sign in to leave a comment.