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
Remove Last Property in SchemaCode to test removing the last property in a schema. When the last property is removed, the rdf:Description node should also be automatically removed. ' Remove all the properties for a specific schema.
' When the last property is removed, the "rdf:Description" node
' is also removed.
' 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
xmp.RemoveSimple xml, "xap:CreateDate"
xmp.RemoveSimple xml, "xap:ModifyDate"
xmp.RemoveSimple xml, "xap:MetadataDate"
xmp.RemoveSimple xml, "xap:CreatorTool"
' Save the XML to verify.
' (This line is not necessary, it is only here for extra information.)
xml.SaveXml "out.xml"
' Save the JPG.
xmp.SaveAppFile "out.jpg"
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.