Index: contrib/taxonomy_export.inc
===================================================================
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ contrib/taxonomy_export.inc	19 Jun 2009 17:35:48 -0000
@@ -0,0 +1,33 @@
+<?php
+// $Id$
+
+/**
+ * Import taxonomy, vocabularies and terms, from a file.
+ *
+ * @param $file
+ *   The path to the file containing the export.
+ * @param $format
+ *   The export format, all taxonomy_xml module formats are supported
+ *   including: xml, 
+ **/
+function install_taxonomy_export_import_from_file($file) {
+  if (!file_exists($file)) {
+    return FALSE;
+  }
+
+  $form_state = array(
+    'values' => array(
+      'op' => t('Import'),
+      'import_data' => file_get_contents($file),
+    ),
+  );
+
+  module_load_include('inc', 'taxonomy_export', 'taxonomy_export.pages');
+
+  if (_taxonomy_export_prepare_import_data($form_state['values']['import_data'])) {
+    taxonomy_export_import_submit(array(), $form_state);
+  }
+  else {
+    drupal_set_message(t('Could not parse import data in "%file".', array('%file' => $file)), 'error');
+  }
+}
