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/Display XMP Array PropertyDelphi sample code to fetch and display XMP array data. procedure TForm1.Button5Click(Sender: TObject);
var
success : Integer;
numXmp: Integer;
xml: IChilkatXml;
sa: ICkStringArray;
i: Integer;
begin
ChilkatXmp1.UnlockComponent('Anything for 30-day trial');
// Load a JPEG image file with XMP metadata.
success := ChilkatXmp1.LoadAppFile('cheeseWithXmp.jpg');
if (success = 0) then
begin
ChilkatXmp1.SaveLastError('lastError.txt');
ShowMessage(ChilkatXmp1.LastErrorText);
end;
// How many XMP metadata docs are embedded in this image file?
numXmp := ChilkatXmp1.NumEmbedded;
if (numXmp > 0) then
begin
// Get the 1st XMP as a Chilkat XML object (IChilkatXml)
// See http://www.chilkatsoft.com/refdoc/xChilkatXmlRef.html
xml := ChilkatXmp1.GetEmbedded(0);
// Fetch and display an array property:
sa := ChilkatXmp1.GetArray(xml,'dc:subject');
for i := 0 to sa.Count-1
do begin
ListBox1.Items.Add(sa.GetString(i));
end;
end;
end;
|
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.