Article View: adobe.scripting.indesign
Article #8957Re: XML Export
From: rajeevkumar
Date: Sat, 16 Sep 2006 11:50
Date: Sat, 16 Sep 2006 11:50
32 lines
2048 bytes
2048 bytes
Hi All,
I want to export xml of text frame in a folder. For it I have developed a program but as I run it, it generate the XML file but the content was not available in those files.
set XMLOutputFolder to choose folder with prompt "Select the location for exporting the XML files"
set K to 0
tell application "Adobe InDesign CS2"
set myDoc to the front document
tell myDoc
set PGcount to get count of pages
set ExportElement to every XML element of XML element 1
repeat with i from 1 to PGcount
tell page i
set BXcount to get count of text frame
repeat with j from 1 to BXcount
set K to K + 1
set K_XT to (characters -3 thru -1 of ("000" & K)) as string
select ExportElement
--set export from selected of XML export preferences to true
export ExportElement format XML to ((XMLOutputFolder as string) & "File_" & K_XT & ".xml") without showing options
end repeat
end tell
end repeat
end tell
end tell
Or i want to export XML of each page in separate files. I mean to say if my indesign document contains 15 pages then I want to create 15 xml file wich conatins contents of each page.
I am waiting for any response from your side.
Thanks
Technical Details
Message-ID:
<3bc1a25e.0@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!feeder.news-service.com!news.astraweb.com!newsrouter-eu.astraweb.com!193.201.147.66.MISMATCH!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!news.isoc.lu!webcrossingReferences:
<3bc1a25e.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,34db7ffeb087eeca X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: rajeevkumar@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!feeder.news-service.com!news.astraweb.com!newsrouter-eu.astraweb.com!193.201.147.66.MISMATCH!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!news.isoc.lu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: XML Export Message-ID: <3bc1a25e.0@webcrossing.la2eafNXanI> Date: Sat, 16 Sep 2006 04:50:01 -0700 References: <3bc1a25e.-1@webcrossing.la2eafNXanI> Lines: 38 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit