• 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
Applescript & Final Cut Server & XML
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

Steve Thompson
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

  • Follow-Ups:
    • Re: Applescript & Final Cut Server & XML
      • From: Martin Michel <email@hidden>
    • Re: Applescript & Final Cut Server & XML
      • From: Deivy Petrescu <email@hidden>
    • Re: Applescript & Final Cut Server & XML
      • From: Stan Cleveland <email@hidden>
  • Prev by Date: [ANN] UI Browser 2.1.0 Released
  • Next by Date: Re: Applescript & Final Cut Server & XML
  • Previous by thread: [ANN] UI Browser 2.1.0 Released
  • Next by thread: Re: Applescript & Final Cut Server & XML
  • Index(es):
    • Date
    • Thread