ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Core Namespace / IMetadata Interface / ImportMetadata Method / ImportMetadata(String,MDImportExportOption,String) Method
Example

In This Topic
    ImportMetadata(String,MDImportExportOption,String) Method
    In This Topic
    Import metadata
    Syntax

    Parameters

    catalogPathOrMDUri
    importType
    styleSheetPath

    Return Value

    void
    Example
    Item: Updates metadata with the imported metadata - the input path can be the path to an item with metadata, or a URI to a XML file: ImportMetadata
    // the input path can be the path to an item with metadata, or a URI to an XML file
    IMetadata metadataItemImport1 = null;
    await QueuedTask.Run(() => metadataItemImport1.ImportMetadata(@"E:\YellowStone.gdb\MyDataset\MyFeatureClass", MDImportExportOption.esriCurrentMetadataStyle));
    
    Item: Updates metadata with the imported metadata: ImportMetadata
    // the input path can be the path to an item with metadata, or a URI to an XML file
    
    await QueuedTask.Run(() => metadataItemImport2.ImportMetadata(@"E:\YellowStone.gdb\MyDataset\MyFeatureClass", MDImportExportOption.esriCustomizedStyleSheet, @"E:\StyleSheets\Import\MyImportStyleSheet.xslt"));
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also