Applescript & Final Cut Server & XML
Applescript & Final Cut Server & XML
- Subject: Applescript & Final Cut Server & XML
- From: Steve Thompson <email@hidden>
- Date: Tue, 25 May 2010 14:29:17 -0700
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.
Currently, I'm trying to retrieve certain values from Final Cut Server by issuing the following:
set assetMeta to do shell script fcsvrClientCmd & " getmd --xml" & assetIDString
which gets me the following XML loaded into assetMeta:
<?xml version=\\\"1.0\\\"?> <session> <values> <value id=\\\"PA_MD_CUST_TALENT_PRIMARY\\\"> <string xml:space=\\\"preserve\\\">I.M. Talented</string> </value> <value id=\\\"CUST_SIZE\\\"> <bigint>362716863</bigint> </value>
....
<value id=\"PA_MD_CUST_CONTACT_EMAIL\"> <string xml:space=\"preserve\">email@hidden</string> </value> <value id=\"ASSET_VIDEO_ELEMENTS\"> <atom>video</atom> </value> </values> </session>
What's throwing me is how to get to a particular value from AS. I'm familiar with Final Cut Pro XML's and have successfully parsed that data using the System Events dictionary, but Final Cut Pro is simple nested keys, not the value attributes (if that is the correct terminology) here. Not to mention that whenever I try to use a "set x to the value of XML element "xxx" of XML element "yyy" of the contents of XML data assetMeta" I get the following error:
error "System Events got an error: Can’t get contents of XML data \"<?xml version=\\\"1.0\\\"?>...
I've tried loading assetMeta as text and as string and can't seem to figure out how to recognize it as XML data.
Any help would be appreciated.
Thanks,
Steve |
_______________________________________________
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