🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #16674

select xml elements using Applescript?

#16674
From: James Naylor
Date: Fri, 08 Aug 2003 16:00
30 lines
1553 bytes
Quick question: do xml elements respond to the select command?

I am still trying to fix up an export from selected element script, but still can't get the thing to work properly. Does the following script look completely wrong?



 
tell application "InDesign 2.0.2" 
	set export from selected of XML export preferences to true

	set myDocument to active document 
	tell myDocument

		set assocXML to associated XML elements of selection 
		set parentXML to parent of item 1 of assocXML

		tell myDocument to select parentXML

		export format XML to "Macintosh HD:test.xml" without showing options 
	end tell 
end tell 




Note, if I put 'parentXML' after the export word (i.e. export parentXML format...), it makes no difference.

Any help would be gratefully received.

James
Technical Details
Message-ID: <1dea4096.-1@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,17fc15234aa5057c,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-08-08 09:08:04 PST
From: "James Naylor" <james.naylor@rbi.co.uk>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!priapus.visi.com!news-out.visi.com!petbe.visi.com!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: select xml elements using Applescript?
Message-ID: <1dea4096.-1@WebX.la2eafNXanI>
Date: Fri, 8 Aug 2003 09:00:44 -0700
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit