🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #21042

Removing XML-tags

#21042
From: Ton Kuypers
Date: Sat, 11 May 2002 22:43
33 lines
1938 bytes
Please... somebody heeeeeeeelp.... What am I doing wrong??? 

I have an InDesign document with 9 frames on a page, all having XML-tags attached to it. After filling these frames with data I duplcate this spread and wat to remove the XML-tags from the first page... But even when using a single page and the following script, it stops with an error after item 6... 

The script:
 tell application "InDesign 2.0"
 	tell active document
 		repeat with i from 1 to the count of (every XML Element)
 			tell XML Element i
 				untag element
 			end tell
 		end repeat
 	end tell
 end tell
 

The result:
 tell application "InDesign 2.0"
 	count every XML Element of active document
 		--> 9
 	untag element XML Element 1 of active document
 	untag element XML Element 2 of active document
 	untag element XML Element 3 of active document
 	untag element XML Element 4 of active document
 	untag element XML Element 5 of active document
 	untag element XML Element 6 of active document
 		--> InDesign 2.0 got an error: XML Element 6 of active document kan niet worden opgevraagd. (can't be found???) 

What is going on, what am I doing wrong??? 

Many thanks in advance 

Ton
Technical Details
Message-ID: <ef87960.-1@WebX.aaQKaf7vad4>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!newsfeed.wirehub.nl!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!news-hub.siol.net!fr.clara.net!heighliner.fr.clara.net!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,3b581a2ee9fbcd93,start
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2002-05-11 16:07:34 PST
From: "Ton Kuypers" <tkuypers@pandora.be>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!supernews.com!newsfeed.wirehub.nl!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!news-hub.siol.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Removing XML-tags
Message-ID: <ef87960.-1@WebX.aaQKaf7vad4>
Date: Sat, 11 May 2002 15:43:48 -0700
Lines: 38
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit