• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Applescript & Final Cut Server & XML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescript & Final Cut Server & XML


  • Subject: Re: Applescript & Final Cut Server & XML
  • From: "Steven D. Majewski" <email@hidden>
  • Date: Wed, 26 May 2010 12:47:12 -0400


On May 26, 2010, at 11:31 AM, Martin Michel wrote:

Hi Steve,

The whole "data world" of our company is XML based, so I wrote myself a small utility to retrieve informations from XML files using XPath expressions:

http://macscripter.net/viewtopic.php?id=28646

Maybe you can also make use of it.



There is also a perl xpath script in /usr/bin ( in 10.5.x -- don't know when it first appeared.)

tmp$ xpath
Usage:
/usr/bin/xpath [filename] query

	If no filename is given, supply XML on STDIN.

So on your example file, you can do something like:

tmp$ xpath asx.xml '/session/values/value[@id="CUST_SIZE"]/bigint/ text()'
Found 1 nodes:
-- NODE --
362716863


The "-- NODE --\n" goes to stderr.
The value goes to stdout.
So you can grab it as the result of a 'do shell script' .


Note: it's only Xpath 1.0, [ not 2.0 ] and it doesn't parse a few complex 1.0 expresssions,
but it's great and simple to grab a value from an xml file.
( However, if you've got to grab several values from a big XML file, it's going to
reparse the XML on each invocation, which is not very efficient. )


-- Steve Majewski


Am 25.05.2010 um 23:29 schrieb Steve Thompson:

Hi all,

I've been hacking AppleScript for years now - quite successfully, but I'm just that, a hack, working in post-production and using AS to automate various post-production tasks.

I'm curious to know if anyone else is using AppleScript in conjunction with Final Cut Server and/or XML processing.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Applescript & Final Cut Server & XML (From: Steve Thompson <email@hidden>)
 >Re: Applescript & Final Cut Server & XML (From: Martin Michel <email@hidden>)

  • Prev by Date: How to delete IMAP junk messages once and for all
  • Next by Date: AppleScript
  • Previous by thread: Re: Applescript & Final Cut Server & XML
  • Next by thread: Packaging an automator service for distribution...
  • Index(es):
    • Date
    • Thread