If you didn't need the form to still be interactive (i.e. a flat form) then it would be easy to do this using LC Output as it has this functionality built in.
Since you need the form to be interactive (so users can update their data) then you will need to split the XML up prior to calling LC Forms. Fortunately you should be able do this within a workflow. You'll need to add loop where you can iterate through the XML file using an XPath expression to get each record individually and then pass that data to Forms.
Thanks for the prompt answer.
No further help forthcoming.
Meanwhile I have found I can use the importData method programmatically to fill a template with data, i.e. create an LC form. And resetData is fine to clear the fields. But all my attempts to save the form by the use of exportData or saveAs (at the app level) have met with failure.
Can anyone out there help me?