How to use prepareKey() for the Migrate module
You can set the $item_ID_xpath to something that does exist in the XML, for example 'name'

Then inside your migration class, you can use the prepareKey method to generate an ID

public function prepareKey($source_key, $row) {
  $row-&gt;glid = crc32($row-&gt;xml-&gt;name);
  $key['glid'] = $row-&gt;glid;
  return $key;
}


I am using crc32() to generate an ID from a string, but I have no clue whether that is smart or not, so use at own risk.

Now that you have an ID ('glid' in the example) you use in the mapping:

$this-&gt;map = new MigrateSQLMap($this-&gt;machineName, array(
  'glid' =&gt; array(
    'type' =&gt; 'varchar',
    'length' =&gt; '255',
    'not null' =&gt; TRUE,
    'description' =&gt; 'id generated from a string'
  ),
), MigrateDestinationNode::getKeySchema()
);


Dont forget to deregister the migration if you change this schema.