Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch XML export

Status
Not open for further replies.

nallentrav

Technical User
Mar 13, 2006
1
GB
Hi,

I have many indesign documents that I need to export as XML, they have all had tags defined, associated and structure set

Is there a script out there that will go through all of these documents in the same folder and automatically export them as XML?

I have seen the following script that does a similar thing except exports as .inx files. Can this be easily adapted to export as XML instead?

dir = '/d/pr2'
alldocs = Folder(dir).getFiles('*.indd')
for( i = 0; i < alldocs.length; i++ )
{
app.open( alldocs )
inxFile = new File( alldocs.fullName.replace( /\.indd/, '.inx' ) )
app.activeDocument.exportFile( ExportFormat.indesignInterchange , inxFile )
app.activeDocument.close()
}

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top