Contains serialized XMP package including header and trailer. A wrapper consisting of a pair of XML processing instructions (PIs) may be placed around the rdf:RDF element.
Sets known metadata properties satisfying the specified predicate. The operation is recursive so it affects all nested packages as well. This method is a combination of AddProperties and UpdateProperties. If an existing property satisfies the predicate its value is updated. If there is a known property missing in the package that satisfies the predicate it is added to the package.
This example shows how to update XMP metadata properties.
using(Metadatametadata=newMetadata(Constants.GifWithXmp)){IXmproot=metadata.GetRootPackage()asIXmp;if(root!=null&&root.XmpPackage!=null){// if there is no such scheme in the XMP package we should create itif(root.XmpPackage.Schemes.DublinCore==null){root.XmpPackage.Schemes.DublinCore=newXmpDublinCorePackage();}root.XmpPackage.Schemes.DublinCore.Format="image/gif";root.XmpPackage.Schemes.DublinCore.SetRights("Copyright (C) 2011-2022 GroupDocs. All Rights Reserved");root.XmpPackage.Schemes.DublinCore.SetSubject("test");if(root.XmpPackage.Schemes.CameraRaw==null){root.XmpPackage.Schemes.CameraRaw=newXmpCameraRawPackage();}root.XmpPackage.Schemes.CameraRaw.Shadows=50;root.XmpPackage.Schemes.CameraRaw.AutoBrightness=true;root.XmpPackage.Schemes.CameraRaw.AutoExposure=true;root.XmpPackage.Schemes.CameraRaw.CameraProfile="test";root.XmpPackage.Schemes.CameraRaw.Exposure=0.0001;// If you don't want to keep the old values just replace the whole schemeroot.XmpPackage.Schemes.XmpBasic=newXmpBasicPackage();root.XmpPackage.Schemes.XmpBasic.CreateDate=DateTime.Today;root.XmpPackage.Schemes.XmpBasic.BaseUrl="https://groupdocs.com";root.XmpPackage.Schemes.XmpBasic.Rating=5;root.XmpPackage.Schemes.BasicJobTicket=newXmpBasicJobTicketPackage();// Set a complex type propertyroot.XmpPackage.Schemes.BasicJobTicket.Jobs=new[]{newXmpJob{ID="1",Name="test job",Url="https://groupdocs.com"},};// ... metadata.Save(Constants.OutputGif);}}