Question:
Looking at XML extracted using CkoXmp, it's clear that PS CC 2014 is saving the contact info struct as (had to edit it a bit to make it show in this message)
< Iptc4xmpCore:CreatorContactInfo Iptc4xmpCore:CiAdrExtadr="IPTCAddress" Iptc4xmpCore:CiAdrCity="IPTCCity" Iptc4xmpCore:CiAdrRegion="IPTCState" Iptc4xmpCore:CiAdrPcode="IPTCPostalCode" Iptc4xmpCore:CiAdrCtry="IPTCCountry" Iptc4xmpCore:CiTelWork="IPTCPhones
Phones2" Iptc4xmpCore:CiEmailWork="IPTCEmail
email2" Iptc4xmpCore:CiUrlWork="IPTCWebsites
websites2" / >
Can CkoXmp read XMP data generated by Photoshop?
Sample Code:
(void) testChikkatGetStructValue { CkoXmp *xmp = [[CkoXmp alloc] init];NSString *jpgXMPFName = [self filepathWithFilename:@"Sample1-PsXMP.jpg"]; jpgXMPFName = [self filepathWithFilename:@"Chilkat-sample1.jpg"];
BOOL success;
success = [xmp UnlockComponent: @"Anything for 30-day trial."]; if (success != YES) { NSLog(@"%@",xmp.LastErrorText); return; }
success = [xmp LoadAppFile:jpgXMPFName]; if (success != YES) { NSLog(@"%@",xmp.LastErrorText); return; } NSLog(@"Extracting XMP from %@", jpgXMPFName); NSLog(@" %@%d",@"Num embedded XMP docs: ",[xmp.NumEmbedded intValue]);
CkoXml *xml = 0; xml = [xmp GetEmbedded: [NSNumber numberWithInt: 0]];
if (xml == nil) { NSLog(@"%@",xmp.LastErrorText); return; } else {
// Log some values from the jpg's xmp data NSString *xmlParseLog = [self filepathWithFilename:@"xmlLog.txt"]; xmp.VerboseLogging = YES; xml.VerboseLogging = YES; xml.DebugLogFilePath = xmlParseLog; NSString *propVal; propVal = [xmp GetStructValue: xml structName: @"Iptc4xmpCore:CreatorContactInfo" propName: @"Iptc4xmpCore:CiTelWork"]; if (propVal == nil ) { NSLog(@"%@",@" property Not found."); NSLog(@"TEXT={{{%@}}}", xmp.LastErrorText); } else { NSLog(@"%@",propVal); }
} }
I'll have a look as soon as possible -- but it may not be until late Monday or Tuesday. I have a feeling it has to do with this (from the XMP specification)
NOTE Many XMP processors use a more concise notation for structure values as described in
7.9.2.3, “rdf:parseType="Resource" attribute”.
PS> The XMP API conceptually offers two things: