ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Core Namespace / IMetadata Interface / SaveMetadataAsXML Method
Example

In This Topic
    SaveMetadataAsXML Method (IMetadata)
    In This Topic
    Save the metadata of the current item as XML
    Syntax
    void SaveMetadataAsXML( 
       string outputFilePath,
       MDSaveAsXMLOption outputType
    )
    Sub SaveMetadataAsXML( _
       ByVal outputFilePath As String, _
       ByVal outputType As MDSaveAsXMLOption _
    ) 

    Parameters

    outputFilePath
    outputType

    Return Value

    void
    Example
    Item: Save the metadata of the current item as XML: SaveMetadataAsXML
    await QueuedTask.Run(() => metadataItemToSaveAsXML.SaveMetadataAsXML(@"E:\Temp\OutputXML.xml", MDSaveAsXMLOption.esriExactCopy));
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also