Sorry for the delay in getting back to this.
There are a few issues in the XML for fitting your precise layout unless you add certain things manually or by search/replace. And that is what I would do to the XML in a text editor like NotePad++ (or, UltraEdit). Either could likely put in the seperators in a large text file by just a few S/R operations.
I can get part way there but it is a not quite thing. I ended up redoing parts of the XML and redoing the tagging. But the merge still fails in various places.
fwiw, QXP does this pretty quickly. There is a long-standing gotcha in that the frames are not threaded once the merge is done, but it simply works. I do most XML in Q.
I hate being beaten by an application so I will probably futz around on this--though I suspect that doesn't do you any good this iteration.
Courtesy of QXP:
Mike