XML Stage to convert child repeating elements into rows
Posted: Thu Jul 10, 2014 9:33 am
Hi All,
Below its a sample transaction record that I am trying to process in XML stage.
There can be multiple TransferFund under one traansaction, when more than one TransferFund are coming then the detila inside the trasnfer fund should come in a new row with the Parent Tag Values.
Could you please lert me know how to solve this issue.
<TrxnRec><ProcessDate>20140702</ProcessDate>
<FundAcctID>26204388</FundAcctID>
<AcctDesig>1</AcctDesig>
<DlrCode>9190</DlrCode>
<DlrAcctID>543080691</DlrAcctID>
<RepCode>AAA</RepCode>
<AcctType>01</AcctType>
<OrdSrc>D</OrdSrc>
<OrdType>D</OrdType>
<SrcID>ETCOF0262043889</SrcID>
<ETCof>
<TrxnTyp>5</TrxnTyp>
<TrxnTypDtl>4</TrxnTypDtl>
<FromAcct>
<FundAcctID>26204388</FundAcctID>
<DlrCode>7568</DlrCode>
<DlrAcctID>543080691</DlrAcctID>
<AcctDesig>1</AcctDesig>
<AcctType>01</AcctType>
</FromAcct>
<TrnsfrFund>
<FundID>266</FundID>
<GrossAmt>0.00</GrossAmt>
<UnitTrxnd>0.0000</UnitTrxnd>
<AveCost>0.0000</AveCost>
</TrnsfrFund>
<TrnsfrFund>
<FundID>568</FundID>
<GrossAmt>21180.08</GrossAmt>
<UnitTrxnd>1650.7480</UnitTrxnd>
<AveCost>0.0000</AveCost>
</TrnsfrFund>
<TrnsfrFund>
<FundID>590</FundID>
<GrossAmt>11394.67</GrossAmt>
<UnitTrxnd>574.8760</UnitTrxnd>
<AveCost>0.0000</AveCost>
</TrnsfrFund>
<TrnsfrFund>
<FundID>702</FundID>
<GrossAmt>26314.79</GrossAmt>
<UnitTrxnd>1326.8990</UnitTrxnd>
<AveCost>0.0000</AveCost>
</TrnsfrFund>
<TradeDate>20140702</TradeDate>
<SettlDate>20140702</SettlDate>
<Demo>
</Demo>
</ETCof>
</TrxnRec>
</TrxnRecon>
Below its a sample transaction record that I am trying to process in XML stage.
There can be multiple TransferFund under one traansaction, when more than one TransferFund are coming then the detila inside the trasnfer fund should come in a new row with the Parent Tag Values.
Could you please lert me know how to solve this issue.
<TrxnRec><ProcessDate>20140702</ProcessDate>
<FundAcctID>26204388</FundAcctID>
<AcctDesig>1</AcctDesig>
<DlrCode>9190</DlrCode>
<DlrAcctID>543080691</DlrAcctID>
<RepCode>AAA</RepCode>
<AcctType>01</AcctType>
<OrdSrc>D</OrdSrc>
<OrdType>D</OrdType>
<SrcID>ETCOF0262043889</SrcID>
<ETCof>
<TrxnTyp>5</TrxnTyp>
<TrxnTypDtl>4</TrxnTypDtl>
<FromAcct>
<FundAcctID>26204388</FundAcctID>
<DlrCode>7568</DlrCode>
<DlrAcctID>543080691</DlrAcctID>
<AcctDesig>1</AcctDesig>
<AcctType>01</AcctType>
</FromAcct>
<TrnsfrFund>
<FundID>266</FundID>
<GrossAmt>0.00</GrossAmt>
<UnitTrxnd>0.0000</UnitTrxnd>
<AveCost>0.0000</AveCost>
</TrnsfrFund>
<TrnsfrFund>
<FundID>568</FundID>
<GrossAmt>21180.08</GrossAmt>
<UnitTrxnd>1650.7480</UnitTrxnd>
<AveCost>0.0000</AveCost>
</TrnsfrFund>
<TrnsfrFund>
<FundID>590</FundID>
<GrossAmt>11394.67</GrossAmt>
<UnitTrxnd>574.8760</UnitTrxnd>
<AveCost>0.0000</AveCost>
</TrnsfrFund>
<TrnsfrFund>
<FundID>702</FundID>
<GrossAmt>26314.79</GrossAmt>
<UnitTrxnd>1326.8990</UnitTrxnd>
<AveCost>0.0000</AveCost>
</TrnsfrFund>
<TradeDate>20140702</TradeDate>
<SettlDate>20140702</SettlDate>
<Demo>
</Demo>
</ETCof>
</TrxnRec>
</TrxnRecon>