diff --git a/includes/FeedsXpathParserXMLReaderParser.inc b/includes/FeedsXpathParserXMLReaderParser.inc
index cad31a9..54bea50 100644
--- a/includes/FeedsXpathParserXMLReaderParser.inc
+++ b/includes/FeedsXpathParserXMLReaderParser.inc
@@ -1,5 +1,9 @@
 <?php
 
+/**
+ * @files
+ * Provides the FeedsXPathParserXML class.
+ */
 
 class FeedsXpathParserXMLReaderParser extends FeedsXPathParserBase {
 
@@ -94,11 +98,16 @@ class FeedsXpathParserXMLReaderParser extends FeedsXPathParserBase {
   }
 
   public function parse(FeedsSource $source, FeedsFetcherResult $fetcher_result) {
+    $source_config = $source->getConfigFor($this);
     $state = $source->state(FEEDS_PARSE);
 
+    if (empty($source_config)) {
+      $source_config = $this->getConfig();
+    }
+
     $filename = $fetcher_result->getFilePath();
 
-    $context_string = $this->xml_reader_context_string();
+    $context_string = $this->xml_reader_get_context_string();
 
     // Count the results if total is empty.
     if (empty($state->total)) {
@@ -109,20 +118,69 @@ class FeedsXpathParserXMLReaderParser extends FeedsXPathParserBase {
     $limit = $source->importer->getLimit();
     $total = $state->total;
 
+    // Get next chunk of items.
+    $this->doc = $this->xml_reader_get_items($filename, $context_string, $start, $limit);
+
+    $parser_result = new FeedsParserResult();
+
+    $mappings = $this->getOwnMappings();
+
+    $this->rawXML = array_keys(array_filter($source_config['rawXML']));
+
+    // Set link.
+    $fetcher_config = $source->getConfigFor($source->importer->fetcher);
+    $parser_result->link = $fetcher_config['source'];
 
-    $xml = $this->xml_reader_get_items($filename, $context_string, $start, $limit);
-    $result = new FeedsParserResult($this->query($xml));
-    unset($xml);
+    $this->xpath = new FeedsXPathParserDOMXPath($this->doc);
+    $config = array();
+    $config['debug'] = array_keys(array_filter($source_config['exp']['debug']));
+    $config['errors'] = $source_config['exp']['errors'];
+
+    $this->xpath->setConfig($config);
+
+    $all_nodes = $this->xpath->namespacedQuery($source_config['context'], NULL, 'context');
+    foreach ($all_nodes as $node) {
+      // Invoke a hook to check whether the domnode should be skipped.
+      if (in_array(TRUE, module_invoke_all('feeds_xpathparser_filter_domnode', $node, $this->doc, $source), TRUE)) {
+        continue;
+      }
+      $parsed_item = $variables = array();
+      foreach ($source_config['sources'] as $element_key => $query) {
+        // Variable substitution.
+        $query = strtr($query, $variables);
+        // Parse the item.
+        $result = $this->parseSourceElement($query, $node, $element_key);
+        if (isset($result)) {
+          if (!is_array($result)) {
+            $variables['$' . $mappings[$element_key]] = $result;
+          }
+          else {
+            $variables['$' . $mappings[$element_key]] = '';
+          }
+          $parsed_item[$element_key] = $result;
+        }
+      }
+      if (!empty($parsed_item)) {
+        $parser_result->items[] = $parsed_item;
+      }
+    }
 
     $state->pointer = $start + ($source->importer->getLimit() - $limit);
     $state->progress($state->total, $state->pointer);
 
-    $result->link = $this->link;
-    return $result;
+    unset($this->doc);
+    unset($this->xpath);
+    return $parser_result;
   }
 
-  protected function xml_reader_context_string() {
-    return $this->source_config['xml_reader_context'];
+  /**
+   * Get the XMLReader Context.
+   *
+   * @return string xml_reader_context
+   *  The XML-Reader context (a / separated context selector).
+   */
+  protected function xml_reader_get_context_string() {
+    return ltrim($this->config['xml_reader_context'], '/');
   }
 
 
@@ -136,14 +194,14 @@ class FeedsXpathParserXMLReaderParser extends FeedsXPathParserBase {
     $xml_reader = new XMLReader();
     $xml_reader->open($filename);
 
-    $tree = new DomDocument();
+    $tree = new DOMDocument();
 
     $count = 0;
     $count_only = TRUE;
     $offset = 0;
     $limit = -1;
 
-    $this->xml_parser_parse($xml_reader, $tree, $tree, $context_elements, $count, $count_only, '', $offset, $limit);
+    $this->xml_reader_parse($xml_reader, $tree, $tree, $context_elements, $count, $count_only, '', $offset, $limit);
     $xml_reader->close();
     $tree = NULL;
 
@@ -151,30 +209,37 @@ class FeedsXpathParserXMLReaderParser extends FeedsXPathParserBase {
   }
 
   /**
-   * Helper method to return a range of items as specified in the context string.
+   * Get a range of items as specified in the context string.
+   *
+   * @param string $filename
+   *  The feed source file.
+   * @param string $context_string
+   *  The XML-Reader context (a / separated context selector).
+   * @param int $offset
+   *  Start possition.
+   * @param int &$limit
+   *  Max items to read.
+   *
+   * @return DOMDocument $tree
    */
   protected function xml_reader_get_items($filename, $context_string, $offset, &$limit) {
-
     $context_elements = explode('/', $context_string);
 
     $xml_reader = new XMLReader();
     $xml_reader->open($filename);
 
-    $tree = new DomDocument();
+    $tree = new DOMDocument();
 
     $count = 0;
     $count_only = FALSE;
 
-    $this->xml_parser_parse($xml_reader, $tree, $tree, $context_elements, $count, $count_only, '', $offset, $limit);
+    $this->xml_reader_parse($xml_reader, $tree, $tree, $context_elements, $count, $count_only, '', $offset, $limit);
     $xml_reader->close();
 
-    $simple_xml = simplexml_import_dom($tree);
-    $tree = NULL;
-
-    return $simple_xml;
+    return $tree;
   }
 
-  protected function xml_parser_parse(&$xml_reader, &$tree, $current_node, $parent_elements, &$count, $count_only = FALSE, $current_parent_node_name = '', &$offset, &$limit) {
+  protected function xml_reader_parse(&$xml_reader, &$tree, $current_node, $parent_elements, &$count, $count_only = FALSE, $current_parent_node_name = '', &$offset, &$limit) {
     while ($xml_reader->read()) {
       if ($limit == 0) {
         return;
@@ -195,13 +260,12 @@ class FeedsXpathParserXMLReaderParser extends FeedsXPathParserBase {
 
               $current_node->appendChild($new_node);
 
-              $this->xml_parser_parse($xml_reader, $tree, $new_node, $new_parents, $count, $count_only, $new_current_parent_node_name, $offset, $limit);
+              $this->xml_reader_parse($xml_reader, $tree, $new_node, $new_parents, $count, $count_only, $new_current_parent_node_name, $offset, $limit);
 
             }
             // Is this the element we're trying fetch.
             elseif ((count($parent_elements) == 1) && ($xml_reader->name == reset($parent_elements))) {
               $count++;
-
               if (!$count_only) {
                 if ($offset > 0) {
                   $offset--;
@@ -210,7 +274,9 @@ class FeedsXpathParserXMLReaderParser extends FeedsXPathParserBase {
                 }
                 else {
                   $limit--;
-                  $current_node->appendChild($xml_reader->expand());
+                  $ex=$xml_reader->expand();
+                  // $current_node->appendChild($xml_reader->expand());
+                  $current_node->appendChild($ex);
                   $xml_reader->next();
                 }
               }
@@ -271,4 +337,13 @@ class FeedsXpathParserXMLReaderParser extends FeedsXPathParserBase {
     return $text;
   }
 
+  /**
+   * Helper callback to return the raw value.
+   *
+   * Needs to be implemented because its defined abstract
+   * in FeedsXPathParserBase.
+   */
+  protected function getRaw(DOMNode $node) {
+  }
+
 }
