Metadata Importer (Conversion)

License Level:BasicStandardAdvanced

Summary

Copies metadata from the source item to the target item. Metadata is retrieved from the source item and transferred to the target item without changing it. The source and target may be ArcGIS items or stand-alone metadata XML files.

The source metadata should be ArcGIS metadata. If the imported information is not stored in the ArcGIS metadata format it must be upgraded to ArcGIS metadata before it will be automatically updated to contain the item's intrinsic properties.

This tool is useful for saving changes made to your metadata with an XSLT stylesheet. For example, a model could update metadata using XSLT Transformation with a custom stylesheet, then use this tool to import the changes to the original ArcGIS item.

This model updates an item's metadata using an XSLT stylesheet

NoteNote:

Existing metadata will be replaced by the imported metadata.

Usage

Syntax

MetadataImporter_conversion (source, target)
ParameterExplanationData Type
source

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

If the source item is a stand-alone file, it must contain well-formed XML data.

Data Element; Layer
target

The item to which the metadata will be imported or a stand-alone XML file that will be replaced.

Data Element; Layer

Code Sample

Import an ArcGIS metadata template to an item

Imports an ArcGIS metadata template XML file containing information shared by all of a project's data. The target item's metadata won't be updated to contain its properties after. Import a template before editing the item's metadata.

import arcpy
from arcpy import env
env.workspace = "C:/data/data.gdb"
arcpy.MetadataImporter_conversion ("c:/data/template.xml","places")

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
10/24/2012