ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Core Namespace / Project Class / GetXml Method
Version

GetXml Method (Project)
Gets the item’s metadata XML document as a string. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public string GetXml()

Return Value

Metadata xml string
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
Not all items support metadata. Be sure to check for empty string or null as the return value from GetXml.
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also