You are here

public function MigrateItemsXML::__construct in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 plugins/sources/xml.inc \MigrateItemsXML::__construct()

Overrides MigrateItems::__construct

File

plugins/sources/xml.inc, line 333
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

public function __construct($xml_url, $item_xpath = 'item', $itemID_xpath = 'id') {
  parent::__construct();
  $this->xmlUrl = $xml_url;
  $this->itemXpath = $item_xpath;
  $this->itemIDXpath = $itemID_xpath;

  // Suppress errors during parsing, so we can pick them up after
  libxml_use_internal_errors(TRUE);
}