diff --git a/FeedsXPathParserXML.inc b/FeedsXPathParserXML.inc
index 0964f4a..db19ddc 100644
--- a/FeedsXPathParserXML.inc
+++ b/FeedsXPathParserXML.inc
@@ -11,6 +11,34 @@
 class FeedsXPathParserXML extends FeedsXPathParserBase {
 
   /**
+   * {@inheritdoc}
+   */
+  public function configDefaults() {
+    $config = parent::configDefaults();
+
+    $config['large_file_process'] = FALSE;
+
+    return $config;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function configForm(&$form_state) {
+    $form = parent::configForm($form_state);
+    $config = $this->getConfig();
+
+    $form['xpath']['large_file_process'] = array(
+      '#type' => 'checkbox',
+      '#title' => t('Process large files'),
+      '#description' => t('Check this option to remove limitations on XML document size and depth. This setting requires libXML of 2.7.0+ version.'),
+      '#default_value' => $config['large_file_process'],
+    );
+
+    return $form;
+  }
+
+  /**
    * Implements FeedsXPathParserBase::setup().
    */
   protected function setup($source_config, FeedsFetcherResult $fetcher_result) {
@@ -30,7 +58,12 @@ class FeedsXPathParserXML extends FeedsXPathParserBase {
     }
     $doc = new DOMDocument();
     $use = $this->errorStart();
-    $success = $doc->loadXML($raw);
+    if (!empty($source_config['large_file_process'])) {
+      $success = $doc->loadXML($raw, LIBXML_PARSEHUGE);
+    }
+    else {
+      $success = $doc->loadXML($raw);
+    }
     unset($raw);
     $this->errorStop($use, $source_config['exp']['errors']);
     if (!$success) {
