Python3 scripts to clean ArcGIS Metadata Style xml file(s) and upload to ArcGIS Online.
- remove legacy fgdc and ESRI elements, geoprocessing history, local storage info, and Metadata copy History
- upload metadata to agol
- pre-process:
- metadata style must be ArcGIS style. Upgrade metadata if it is FGDC style
- gp tool - Upgrade Metadata with "FGDC_TO_ARCGIS" as Upgrade Type
- export metadata
- gp tool - XSLT Transformation with "exact copy of.xslt" as Input XSLT
- metadata style must be ArcGIS style. Upgrade metadata if it is FGDC style
- requirements:
- AGOL Item IDs
- xml file(s)
- ArcGIS Online account with admin privilege
- remove local storage info strict.xslt: ESRI ArcGIS Desktop remove local storage info strict stylesheet.
- agol_metadata_update.py - prepare xml metadata file and upload to AGOL.
- things to change/replace
- ArcGIS Desktop Installation Location
- ArcGIS Online Item IDs
- xml file paths
- if you don't have to update the publication date with other dates such as revised or creation date, you can remove or comment out from line 264 to 326. The default AGOL html rendering engine doesn't show other dates except the publication date and Open Data Portal (ArcGIS Hub) also uses the publication date to update the updated date.
- things to change/replace
- FGDCTagCleanup.xslt: xslt that removes FGDC element. Modifed EPA Metadata Editor EMEToolbox EPAUpgradeCleanup.xslt.