public function MigrateListXML::getIdList in Migrate 6.2
Same name and namespace in other branches
- 7.2 plugins/sources/xml.inc \MigrateListXML::getIdList()
Load the XML at the given URL, and return an array of the IDs found within it.
Return value
array
Overrides MigrateList::getIdList
File
- plugins/
sources/ xml.inc, line 56 - Support for migration from XML sources.
Class
- MigrateListXML
- Implementation of MigrateList, for retrieving a list of IDs to be migrated from an XML document.
Code
public function getIdList() {
migrate_instrument_start("Retrieve {$this->listUrl}");
$xml = simplexml_load_file($this->listUrl);
migrate_instrument_stop("Retrieve {$this->listUrl}");
if ($xml !== FALSE) {
return $this
->getIDsFromXML($xml);
}
else {
Migration::displayMessage(t('Loading of !listUrl failed:', array(
'!listUrl' => $this->listUrl,
)));
foreach (libxml_get_errors() as $error) {
Migration::displayMessage(MigrateItemsXML::parseLibXMLError($error));
}
return NULL;
}
}