Probably this is simple question, but…
I try this simple command to get all values of <IC_Editors xml> token:
do shell script "xpath /Users/rkiedrzynski/Desktop/pagelist.xml //IC_Editors"
Wow, it works. Fast, much faster than system events parser, and the text item delimters loops.
But the result looked this:
Is the simple way to remowe tokens from this string simple from terminal, without using text item delimiters?
Model: PM G5
Browser: Firefox 3.6.13
Operating System: Mac OS X (10.5)
It’s true that system event’s xml parser is way to slow. It’s better to use XMLTools scripting addition instead. It has also an xpath feature to access xml elements very fast just like you did in the terminal. I’ve used xml starlet in the passed with applescript but xmltools is much faster than working with a shell. Speed wise you won’t be disappointed either with XMLTools.
Thank you for your reply, DJ.
But, this script is a part of applescript studio (xcode) application. This app may be distribute to computers as a simple one file download. In small network. Download, unzip, an run.
Any scripting additions is not a good way…
Maybe is any mistical switch to xpath command, for getting only values, without tokens?
Yes therefore it’s also suitable.
Create in your finished application a new sub folder in the resource folder named ‘Scripting Additions’. Then make a copy of XMLTools into this folder. Now this scripting addition is implemented in your application and the user doesn’t need to install the scripting additional separately any more. This is for Applescript Studio applications very common. You still have your file single application like it is now when you distribute it.