Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Display XMP rdf:Bag, rdf:Seq, or rdf:Alt Demonstrates how to access the items of an XMP array property. ' Display the contents of an array (rdf:Bag) property of an XMP
' The same code works for rdf:Seq and rdf:Alt properties.
' Create an instance of the XMP ActiveX and unlock it.
Dim xmp As New ChilkatXmp
success = xmp.UnlockComponent("anything for 30 day trial")
If (success = 0) Then
MsgBox "Failed to unlock"
Exit Sub
End If
' Load a JPG file.
success = xmp.LoadAppFile("IndependantPhotographer-Example.jpg")
If (success = 0) Then
MsgBox xmp.LastErrorText
Exit Sub
End If
' Get the 1st (and only) XMP in this JPG.
Dim xml As ChilkatXml
Set xml = xmp.GetEmbedded(0)
If (xml Is Nothing) Then
MsgBox xmp.LastErrorText
Exit Sub
End If
' Get the dc:subject rdf:bag property
Dim sa As CkStringArray
Set sa = xmp.GetArray(xml, "dc:subject")
If (sa Is Nothing) Then
MsgBox "dc:subject property not found"
Exit Sub
End If
' Display the items within the array.
n = sa.Count
For i = 0 To n - 1
List1.AddItem sa.GetString(i)
Next
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.