Skip to main content
August 17, 2011
Question

Applescript - Untag all XML tags after importing.

  • August 17, 2011
  • 1 reply
  • 499 views

Have the following which works to untag 1 xml tag at a time but we'd like to untag everything if possible.  We could loop through if needed but don't know how to get total number of elements so we know how many times to loop.  We currently just put value greater than will ever be with try so it works but wondering if there is an easier way?    Is there a tell every or something like that?   Thanks, Joe

set myXMLElement to XML element 1 of XML element 1 of myDocument

tell myXMLElement to untag

This topic has been closed for replies.

1 reply

August 17, 2011

Found something that should work.

untag (every XML element of XML element 1 if myDocument)