Hi I'm trying to access an ArcGIS Pro item's metadata XML using python and was wondering if anyone could help. I'm using the exportMetadata function in the documentation ((https://pro.arcgis.com/en/pro-app/latest/arcpy/metadata/metadata-class.htm)) but when I open the XML that I stored, it looks like the code piece below. It's the metadata of when I ran my python script instead of the metadata of the item in Pro. Has anyone ran into a similar issue or know the solution?
<?xml version="1.0"?>
<metadata xml:lang="en"><Esri><CreaDate>20230327</CreaDate><CreaTime>11230800</CreaTime><ArcGISFormat>1.0</ArcGISFormat><SyncOnce>TRUE</SyncOnce></Esri></metadata>
Here's what my code looks like:
item_metadata = md.Metadata(path)
item_metadata.exportMetadata(outputXMLPath)
Thank you!
What specific item are you trying to get the metadata for? Seeing more of your code could help with an answer.