ISDoc to Flatfile Conversion Problem

Hi all,
I’m trying to convert ISDoc to ff data using pub.flatFile:convertToString
The ISDoc structure is as follows:
Record1
–>Record2
---->Record3
------>RecordList1
-------->String1
-------->String2
-------->Record4
----------->String3
-------->RecordList2
----------->String4
I prepared the schema (delimiters: 'newline’for delimited record, ‘,’ for field) for the above mentioned structure and generated the corresponding document type. I also verified that th structure looks exactly the same as that of the ISDoc type.
But when i pass the ISDoc as input to ffValues and give the full namespace path of the schema, i finally get a string as output. But when i try to parse the output string with the schema again, the values are not getting properly filled into the respective fields.
Am i missing something here? Let me know if you need any other info for further understanding. Any help is greatly appreciated.
P.S: I tried to search in this forum. I tried those ideas too. But couldn’t accomplish my task.

Finally, i solved my problem by re-arranging the hierarchy of the RecordLists. Now it works like a charm.

Hope.