• 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: Deivy Petrescu <email@hidden>
  • Date: Wed, 26 May 2010 11:22:22 -0400

Instead of using just the OSAX, I'd download Smile and use it to work with the XML.
Regardless of how you use it, it is always good to have Smile available .




On May 25, 2010, at 5:29 PM, Steve Thompson wrote:

> 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

Deivy Petrescu
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>)

  • Prev by Date: Re: Applescript & Final Cut Server & XML
  • Next by Date: Re: Applescript & Final Cut Server & XML
  • Previous by thread: Re: Applescript & Final Cut Server & XML
  • Next by thread: Re: Applescript & Final Cut Server & XML
  • Index(es):
    • Date
    • Thread