Metadata Importer (Conversion)
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.
Existing metadata will be replaced by the imported metadata.
Metadata may include unique identifiers that help to manage documents in a metadata catalog. This tool does not remove any unique identifiers in the source metadata before importing it. This is the desired behavior if you modify the source item's metadata as described above using an XSLT stylesheet, for example, to update contact information, and need to import the result back to the original item. In this case, you want the metadata to keep the same unique identifier it had before.
However, if you want to import metadata created outside of ArcGIS or to copy information from one item to another, use Import Metadata instead; it removes unique identifiers from the imported information. Many items should not share the same unique identifier.
After the source metadata is copied to the target, no changes are made to the target item's metadata. For example, the target item's metadata will not be synchronized to contain the item's current properties.
Text or HTML files containing metadata can't be imported.
This tool can import one source item to one target item. To import one source item to many target items or to import different source items to different target items, open the tool in batch mode and set the tool's parameters appropriately.
The Source Metadata parameter has a complex data type. If you use this tool in a model, create a variable for the Source Metadata parameter in ModelBuilder by right-clicking the tool and choosing Make Variable > From Parameter > Source Metadata.
When using this tool in ModelBuilder, the Output Metadata parameter is derived from the Target Metadata parameter.
If you do not have write access to the ArcGIS item or its metadata or the stand-alone metadata XML file that you are trying to modify, this tool will complete successfully but the item's original metadata will remain unchanged.
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|
The item to which the metadata will be imported or a stand-alone XML file that will be replaced.
|Data Element; Layer|
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")