Import XML into an Indesign Template
Posted: Tue Jul 07, 2020 11:09 pm
We are attempting to take XML data and import into Indesign to create a job ticket.
I'm doing this with scripting in 2 steps.
//JS FILE for opening template
openTemplate() {
var curFile = File ( "/c/ProductionTickets/IndesignFiles/Production Ticket.indt" );
var curDoc = app.open( curFile );
}
openTemplate();
Then I'm running the command to import the XML file. The XML file is what is traveling in the flow.
//COMMAND JS FILE
main ()
function main () {
$doc.importXML( File($infile) );
}
This is creating an error and stopping the Indesign Configurator.
I'm new to scripting and would appreciate some help.
I'm doing this with scripting in 2 steps.
//JS FILE for opening template
openTemplate() {
var curFile = File ( "/c/ProductionTickets/IndesignFiles/Production Ticket.indt" );
var curDoc = app.open( curFile );
}
openTemplate();
Then I'm running the command to import the XML file. The XML file is what is traveling in the flow.
//COMMAND JS FILE
main ()
function main () {
$doc.importXML( File($infile) );
}
This is creating an error and stopping the Indesign Configurator.
I'm new to scripting and would appreciate some help.