Copy link to clipboard
Copied
Dear scripters,
I'd like to find a way to alert the XMLTags name of the currently selected text or of the text where my cursor currently stands in.
Something like this works:
alert(app.activeDocument.xmlTags.item(0).name);
The problem is, that the above sample is static and only shows the name of item(0).
How can I fix this?
By the way, where can I look up the XML tags syntax? Is there any literature or a syntax overview?
Thanks for your help,
TYPO
Hi Typo,
try below code on CS4
alert(app.selection[0].associatedXMLElements[0].markupTag.name)
Copy link to clipboard
Copied
Hi Typo,
try below code on CS4
alert(app.selection[0].associatedXMLElements[0].markupTag.name)
Copy link to clipboard
Copied
COOLIO!
It works perfect, thanks!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now