protected function MigrateListXML::registerNamespaces in Migrate 7.2
Explicitly register namespaces on an XML element.
Parameters
SimpleXMLElement $xml: A SimpleXMLElement to register the namespaces on.
2 calls to MigrateListXML::registerNamespaces()
- MigrateListXML::computeCount in plugins/
sources/ xml.inc - 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.
- MigrateListXML::getIdList in plugins/
sources/ xml.inc - Load the XML at the given URL, and return an array of the IDs found within it.
File
- plugins/
sources/ xml.inc, line 150 - 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
protected function registerNamespaces(SimpleXMLElement &$xml) {
foreach ($this->namespaces as $prefix => $namespace) {
$xml
->registerXPathNamespace($prefix, $namespace);
}
}