Thread View: adobe.scripting.indesign
6 messages
6 total messages
Started by Jennifer_Cross
Wed, 07 Jan 2009 15:25
Exporting XML from a multi-page document
Author: Jennifer_Cross
Date: Wed, 07 Jan 2009 15:25
Date: Wed, 07 Jan 2009 15:25
6 lines
1381 bytes
1381 bytes
I am using CS3 and JavaScript. I have a multi-page InDesign document (.indd) that is tagged throughout the document. I was wondering if there is a way to export just the XML tags from each individual page into a file, rather than the entire structure. I have also tried to extract each page from the multi-page document into it's own ".indd" file and then export the XML from that single page ".indd" file, but when I do that, I also get the tags from the previous page in the exported XML file. I would just like the tags from the page and nothing else. Any help will be appreciated. Thanks, Jennifer
Re: Exporting XML from a multi-page document
Author: loic_aigon
Date: Wed, 07 Jan 2009 21:27
Date: Wed, 07 Jan 2009 21:27
3 lines
811 bytes
811 bytes
It seems that you can't remove unused xml elements (as for swatches for example) from the UI so, it might be possible through scripting. I am afraid that you can't automate this kind of things. Loic
Re: Exporting XML from a multi-page document
Author: Olav_Kvern
Date: Wed, 07 Jan 2009 21:59
Date: Wed, 07 Jan 2009 21:59
7 lines
1179 bytes
1179 bytes
Hi Jennifer, I don't find this to be true--in CS4, anyway. When I move a page containing XML content into a new document, only that content and its parents appear in the new document. The XML elements preceding or following the copied XML elements are not copied over. The parent elements have to be copied over because they're part of the structure on those pages. Does that make sense? Are you seeing XML content other than the parent elements? Thanks, Ole
Re: Exporting XML from a multi-page document
Author: Jennifer_Cross
Date: Thu, 08 Jan 2009 12:47
Date: Thu, 08 Jan 2009 12:47
6 lines
758 bytes
758 bytes
Hi Ole, That is interesting. How are you moving the page into a new document? Are you doing it with a JavaScript or manually? Thanks, Jennifer
Re: Exporting XML from a multi-page document
Author: Jennifer_Cross
Date: Thu, 08 Jan 2009 12:52
Date: Thu, 08 Jan 2009 12:52
7 lines
899 bytes
899 bytes
Hi Loic, Thanks for your response too. By the way, I downloaded and used your ExtractPages_test.jsx that you posted back in June and it works great. Now I'm hoping to create a script to extract just the XML tags from a given page, but I'm not sure if it can be automated. Jennifer
Re: Exporting XML from a multi-page document
Author: loic_aigon
Date: Thu, 08 Jan 2009 13:29
Date: Thu, 08 Jan 2009 13:29
9 lines
1114 bytes
1114 bytes
Hi Jennifer,
I ain't seen any way to export your doc to xml by scripting. I don't say it's not possible, it's just that from my side I couldn't.
I couldn't get the exportFile(File("/x/toto.xml") command working.
The other approach could have been to invoke the export to xml menu action but although the command works, it's just opening the xml export window and you have not really gone far.
Maybe Olav and other scripting masters will have the key but I havn't :-(
A+ Loic
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads