Validate Metadata (Conversion)


Exports metadata to a standard metadata format then validates the exported file.

ArcGIS metadata can't be directly validated against a metadata standard's XML schema. This tool validates ArcGIS metadata by first exporting it to an XML file that is formatted to follow a metadata standard's XML schema using Export Metadata, then validating the exported file using XML Schema Validation. Only use this tool to validate ArcGIS metadata, not a stand-alone XML file that is already formatted correctly for a metadata standard's XML format.

Any validation errors and warnings will be reported in the tool's messages.



ValidateMetadata_conversion (Source_Metadata, Translator, Schema_URL, {Namespace_URI}, {Output_File})
ParameterExplanationData Type

The item whose metadata will be validated or a stand-alone XML file that will be validated.

Data Element; Layer

An XML file that defines the conversion that will be performed.

The translator files provided with ArcGIS Desktop can be found in the <ArcGIS Installation Location>\Metadata\Translator folder. The following conversions are supported:

  • ArcGIS to FGDC (ARCGIS2FGDC.xml)
  • ArcGIS to ISO 19139 (ARCGIS2ISO19139.xml)
  • FGDC to ArcGIS (FGDC2ESRI_ISO.xml)
  • FGDC to ISO 19139 (FGDC2ISO19139.xml)
  • ISO 19139 to ArcGIS (ISO19139_2ESRI_ISO.xml)
  • ArcGIS or ESRI-ISO to ISO 19139 (ESRI_ISO2ISO19139.xml)

The XML Schema or XML DTD that describes the structure and content of a valid XML document.


The XML namespace that will be validated for an XML Schema, if appropriate, or the root element of the document for an XML DTD.

If this value is inappropriate for the XML Schema being used, provide the pound sign (#) instead of a namespace URI.


A stand-alone XML file that will be created containing the converted metadata.


Code Sample

Validate metadata for an ArcGIS item

Exports ArcGIS metadata to an XML file and validates the exported file using an XML Schema.

import arcpy
from arcpy import env
env.workspace = "C:/data"
#set local variables
dir = arcpy.GetInstallInfo("desktop")["InstallDir"]
translator = dir + "Metadata/Translator/ESRI_ISO2ISO19139.xml"
schema = ""
namespace = ""
arcpy.ValidateMetadata_conversion ("vegtype.dbf", translator, schema,
    namespace, "vegtype_19139.xml")


Related Topics

Licensing Information

ArcView: Yes
ArcEditor: Yes
ArcInfo: Yes