I am unable to get a property from an XMP sidecar file. The code snippet below gets the "CreatorTool" property.
The code works if the target file is a JPG, but fails if the target file is a XMP sidecar file.
if ( !ExternalObject.AdobeXMPScript )
ExternalObject.AdobeXMPScript = new ExternalObject('lib:AdobeXMPScript');
targetFile = File.openDialog ("Select test file...", "*.xmp,*.jpg", false)
xmpFile = new XMPFile(targetFile.fsName, XMPConst.XML, XMPConst.OPEN_FOR_READ);
xmp = xmpFile.getXMP();
alert(xmp.getProperty(XMPConst.NS_XMP,"CreatorTool"));
xmpFile.closeFile(XMPConst.CLOSE_UPDATE_SAFELY);
unloadXMPLibrary();
I must be missing something. Any ideas?