public function MigrateListXML::computeCount in Migrate 6.2
Same name and namespace in other branches
- 7.2 plugins/sources/xml.inc \MigrateListXML::computeCount()
Return a count of all available IDs from the source listing. The default implementation assumes the count of top-level elements reflects the number of IDs available - in many cases, you will need to override this to reflect your particular XML structure.
Overrides MigrateList::computeCount
File
- plugins/
sources/ xml.inc, line 99 - 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 computeCount() {
$xml = simplexml_load_file($this->listUrl);
// Number of sourceid elements beneath the top-level element
$count = count($xml);
return $count;
}