Hi Sagar,
I'm bit confused on your query.
If your expected file is like below it can simply handle by using fcc .
XI/PI: File Content Conversion for Complex Structures
MT
Header
f1
f2
Body
f3
f4
If it has more deeper structures ,then I would recommend you to use the below approach.
Simplest way to Convert Flat File to Deeply Nested XML Structures Using Java Mapping
Regards
Venkat