Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Fetch Value of XMP Structure Property FieldDownloads for Windows/Linux and Install Instructions Ruby example to list the field names for a structure property. # file: xmpFetchStructField.rb require 'rubygems' require 'chilkat' # Fetch the value of a single field within a structure property. xmp = Chilkat::CkXmp.new() success = xmp.UnlockComponent("Anything for 30-day trial") if not success xmp.SaveLastError("errorLog.txt") exit end success = xmp.LoadAppFile("images/xmpExample.jpg") if not success xmp.SaveLastError("errorLog.txt") exit end # How many embedded XMP documents in the image file? numEmbedded = xmp.get_NumEmbedded() if (numEmbedded == 0) print "This JPG does not have embedded XMP metadata\n" exit end # Retrieve the 1st XMP document as a CkXml object. # (There is usually only a single embedded XMP) xml = xmp.GetEmbedded(0) # Gets the CiAdrCity member of the CreatorContactInfo structure: value = xmp.structValue(xml,"Iptc4xmpCore:CreatorContactInfo", "Iptc4xmpCore:CiAdrCity") print "value = " + value + "\n" |
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.