Hello,
I have used System Events in the past to parse XML files, but for some reason, I am having a hard time with the XML files output by Final Cut Server.
Here is the XML that I am trying to read in:
<?xml version="1.0"?> 165869421 /Anchors Laura_001.mov 2008-06-01 23:23:44+0 00:00:11;11 admin 116.621 2007-04-26 10:43:35+0 video_clip NABStuff Ready for Review 1280x1080 true 29.97 pa_asset_media raw16bit_be 58 video/quicktime true 02:29:02;05 dvcpro_hd 2008-10-01 04:05:28+0 Laura_001 2008-10-01 04:05:28+0 videoSo, I am looking to pull out the Title Info, Asset ID, Status, and Creation Date. But I am getting caught with the levels of the XML.
This is not working.
tell application "System Events"
set XMLfile to (choose file) as Unicode text
set theXML to contents of XML file XMLfile
set thetitle to value of XML element "Title" of XML element "Metadata" of XML element "entity" of XML element "getMdReply" of XML element "FinalCutServer" of theXML
end tell
Cheers.