ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Core Namespace / IMetadata Interface / ExportMetadata Method / ExportMetadata(String,MDImportExportOption,MDExportRemovalOption) Method
Example

In This Topic
    ExportMetadata(String,MDImportExportOption,MDExportRemovalOption) Method
    In This Topic
    Export metadata
    Syntax

    Parameters

    outputFilePath
    exportType
    removalOption

    Return Value

    void
    Example
    Item: export the metadata of the currently selected item: ExportMetadata
    {
      // Note: Needs QueuedTask to run
      metadataItemExport.ExportMetadata(@"E:\Temp\OutputXML.xml", MDImportExportOption.esriCustomizedStyleSheet, MDExportRemovalOption.esriExportExactCopy, @"E:\StyleSheets\Export\MyExportStyleSheet.xslt");
      // Or export using the current metadata style
      metadataItemExport.ExportMetadata(@"E:\Temp\OutputXML.xml", MDImportExportOption.esriCurrentMetadataStyle, MDExportRemovalOption.esriExportExactCopy);
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also