And it's not this:
// imports XML manually
var myXMLFile=File.openDialog("Choose the current XML file");
Can you please try the below JS code and let me know if you have queries any.
var myDoc = app.activeDocument; var myXMLFile=File.openDialog("Choose the current XML file"); myDoc.importXML(File(myXMLFile)); myDoc.xmlElements.placeXML(myDoc.pages.textFrames);
Lovely - the XML import works although I now need to get my head around XML story formatting. It's dropping all the XML into the first frame on the first page, which I understand to a degree, but also dropping the XML where I need it.
The issue I have with the XML import is the automated document creation has been built around a sort of hybrid flow- and frame-based XML import. Some of the XML drops into a couple of text frames on the first page (creation date, sections etc), then the rest of the document autoflows onto however many pages it requires.
It looks like I'll need to convert it to entirely flow-based XML import, which might be a bit of a head-scratch for me (being relatively new to this).
Thanks very much. No doubt I'll be back on here with more questions but this is a huge help.
<edit> I did 'fix' the XML, and it works a treat. The more I do, the more I understand.
It does not work in CS4 ...
How could it work?