Hi.
How is the primary key determined ? Is it taken from the source ? Or is it auto-increment / a sequence ?
What is the target database technology ?
In the latter case, maybe you can stage your XML data, load your main table, and then load the child tables with a join between the stage and the main table.
This is an interesting case. Let us know what you find out or if you need more help