Skip to Content

File sender Content conversion nested structure

Hello,

I have source structure like below...

Company_Details (0 to 1)
Location_Details (0 to unbounded)
-Contact_Details (0 to unbounded)

Company _Details and Location_Details are on the same level but Contact_Details is under Location_details.

Contact_Details will be repeated along with the Location_details.

My source txt file is as below..Key fields are in bold.

C|UD|USA|North America Dealer|6250 amtritage ave|city name|State|Region|30676|US
L|320445|ObjectUpdate|CN|Sales,Inc.|6754 Hwy 27|Berne|IN|Indiana|46541|US P|logistics_01|Logistics||Berne|LogisticsInquiries@abc.com|430-813-6554
L|324206|ObjectUpdate|CN|ABC Corp|2132 Park Ave |Duluth|TN|State|35496|US P|logistics_02|Logistics|Duluth|LogisticsInquiries1@abc.com|667-813-6671

Below are my FCC details..

Recordset Structure: Company_Details,1,Location_Details,*,Contact_Details,*

Recordset Sequense: Ascending

FCC converted xml I am getting Contact_Details segment also on the same level as Location_details but i need Contact_details under Location_Details Segment.

Where am i doing mistake i am not sure. Could you please throw some inputs on this? thanks !

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Sep 20, 2017 at 08:03 AM

    Try something like below, Create a intermediate structure where Location details will be root for contact details

    For all root nodes map directly for contact details map like below.

    For all sub elements.

    Test Results

    Let us know if this is the requirement, else you can share the XML

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 19, 2017 at 10:14 PM

    Hi Bhavana!

    FCC is not applicable to convert nested structures at all.

    In your case I would use java mapping to convert flat file to desired XML structure or FCC to get one level XML structure and XSLT mapping at next step to convert it to result structure.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 19, 2017 at 03:25 PM

    Hello Bhavana,

    I don't think this conversion is possible in FCC Since location and contact details both are repeating, But you can handle this using multi level mapping.

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Bhavana,

      This is like nested structure where sub trees need to be grouped based on some condition,Can you share the XML generated so that I shall try and provide the mapping program.