Summary
Exports metadata for many ArcGIS items to a designated folder and validates the exported files. This tool is a model that uses the Validate Metadata tool to validate metadata for many ArcGIS items.
Usage
The output XML files are named by appending _export.xml to the item's name and are stored in the specified folder.
Syntax
ValidateMetadataMultiple(Source_Metadata, Translator, Schema_URL, {Namespace_URI}, Output_Folder)
Parameter | Explanation | Data Type |
Source_Metadata [Source_Metadata,...] |
The item whose metadata will be validated or a stand-alone XML file that will be validated. | Data Element |
Translator | 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 translators are provided:
| File |
Schema_URL | The XML Schema or XML DTD that describes the structure and content of a valid XML document. | String |
Namespace_URI (Optional) | 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, use the pound sign (#) instead of a namespace URI. | String |
Output_Folder | An existing folder where the output XML files containing the converted metadata will be stored. | Folder |
Code sample
Validate metadata for many ArcGIS items
Exports metadata for many ArcGIS items to the specified folder and validates the exported files.
import arcpy
from arcpy import env
env.workspace = "C:/data/yellowstone.gdb"
#set local variables
sources = "roads;water;lakes;rivers;streams"
dir = arcpy.GetInstallInfo("desktop")["InstallDir"]
translator = dir + "Metadata/Translator/ESRI_ISO2ISO19139.xml"
schema = "http://www.isotc211.org/schemas/2005/gmd/metadataEntity.xsd"
namespace = "http://www.isotc211.org/2005/gmd"
arcpy.ValidateMetadataMultiple_conversion (sources, translator,
"c:/data/19139metadata", schema, namespace)
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes