diff --git a/plugins/sources/xml.inc b/plugins/sources/xml.inc
index 11cd55e..826e48a 100644
--- a/plugins/sources/xml.inc
+++ b/plugins/sources/xml.inc
@@ -57,6 +57,7 @@ class MigrateListXML extends MigrateList {
     migrate_instrument_start("Retrieve $this->listUrl");
     $xml = simplexml_load_file($this->listUrl);
     migrate_instrument_stop("Retrieve $this->listUrl");
+    $this->registerNamespaces($xml);
     if ($xml) {
       return $this->getIDsFromXML($xml);
     }
@@ -309,6 +310,13 @@ class MigrateItemsXML extends MigrateItems {
   protected $xml = FALSE;
 
   /**
+   * An array of namespaces to explicitly register before Xpath queries.
+   *
+   * @var namespaces
+   */
+  protected $namespaces;
+
+  /**
    * xpath identifying the element used for each item
    */
   protected $itemXpath;
@@ -325,11 +333,12 @@ class MigrateItemsXML extends MigrateItems {
     return $this->itemIDXpath;
   }
 
-  public function __construct($xml_url, $item_xpath='item', $itemID_xpath='id') {
+  public function __construct($xml_url, $item_xpath='item', $itemID_xpath='id', $namespaces = array()) {
     parent::__construct();
     $this->xmlUrl = $xml_url;
     $this->itemXpath = $item_xpath;
     $this->itemIDXpath = $itemID_xpath;
+    $this->namespaces = $namespaces;
 
     // Suppress errors during parsing, so we can pick them up after
     libxml_use_internal_errors(TRUE);
@@ -361,6 +370,9 @@ class MigrateItemsXML extends MigrateItems {
           Migration::displayMessage(self::parseLibXMLError($error));
         }
       }
+      else {
+        $this->registerNamespaces($this->xml);
+      }
     }
     return $this->xml;
   }
@@ -441,6 +453,11 @@ class MigrateItemsXML extends MigrateItems {
     $ids = array();
     if ($result) {
       foreach ($result as $element) {
+        if (!isset($element)) {
+          continue;
+        }
+        // Namespaces must be reapplied after xpath().
+        $this->registerNamespaces($element);
         $id = $this->getItemID($element);
         if (!is_null($id)) {
           $ids[] = (string)$id;
@@ -505,6 +522,11 @@ class MigrateItemsXML extends MigrateItems {
 
     if ($result) {
       foreach ($result as $item_xml) {
+        if (!isset($item_xml)) {
+          continue;
+        }
+        // Namespaces must be reapplied after xpath().
+        $this->registerNamespaces($item_xml);
         $id = $this->getItemID($item_xml);
         $item = new stdclass;
         $item->xml = $item_xml;
@@ -519,6 +541,17 @@ class MigrateItemsXML extends MigrateItems {
   }
 
   /**
+   * Explicitly register namespaces on an xml element.
+   *
+   * @param SimpleXMLElement$xml
+   */
+  protected function registerNamespaces(SimpleXMLElement &$xml) {
+    foreach ($this->namespaces as $prefix => $namespace) {
+      $xml->registerXPathNamespace($prefix, $namespace);
+    }
+  }
+
+  /**
    * Get the item ID from the itemXML based on itemIDXpath.
    *
    * @return string
