You are here

protected function MigrateItemsXML::registerNamespaces in Migrate 7.2

Explicitly register namespaces on an XML element.

Parameters

SimpleXMLElement $xml: A SimpleXMLElement to register the namespaces on.

3 calls to MigrateItemsXML::registerNamespaces()
MigrateItemsXML::getIDsFromXML in plugins/sources/xml.inc
Given an XML object, parse out the IDs for processing and return them as an array. The location of the IDs in the XML are based on the item xpath and item ID xpath set in the constructor. eg, xpath = itemXpath . '/' . itemIDXpath IDs are…
MigrateItemsXML::getItemsFromXML in plugins/sources/xml.inc
Parses out the items from a given XML object, and parse it's items.
MigrateItemsXML::xml in plugins/sources/xml.inc
Load and return the xml from currentUrl.

File

plugins/sources/xml.inc, line 530
Support for migration from XML sources.

Class

MigrateItemsXML
Implementation of MigrateItems, for providing a list of IDs and for retrieving a parsed XML document given an ID from this list.

Code

protected function registerNamespaces(SimpleXMLElement &$xml) {
  foreach ($this->namespaces as $prefix => $namespace) {
    $xml
      ->registerXPathNamespace($prefix, $namespace);
  }
}