🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2471

Tags within a text selection...

#2471
From: cinematomico
Date: Tue, 16 Dec 2008 17:31
15 lines
1014 bytes
(JavaScript - CS3 - Mac)

Hi everybody,
Is there a way to know if a text selection contains any xml tag?
I get a text object from a selection:

var myDocument = app.activeDocument;
var mySelection = myDocument.selection;
var myText = mySelection[0];

The only thing I can do is "myText.associatedXMLElements" to get the XML element in the XML structure... but I need to know which tags I have within my selection.

Would be great a suggestion.

Thanks anticipately!
Technical Details
Message-ID: <59b748a8.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,eedb1af1127a8ed3,start
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: cinematomico@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Tags within a text selection...
Message-ID: <59b748a8.-1@webcrossing.la2eafNXanI>
Date: Tue, 16 Dec 2008 09:31:13 -0800
Lines: 17
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit