Hi Bhargava,
You are right, the challenge is to try to convert the XML with the file content conversion in a plane file. You can develop a module java class if you can't find th fcc correct way to do, but i don like personally this option.
You can check if the B2B open initiative for PI Open PI Initiative (OPI2) - Process Integration - SCN Wiki
is useful for you, at least it is free and it can be good start point.
Regards.