--- csv_format.inc.orig	2010-05-06 11:34:53.000000000 +0100
+++ csv_format.inc	2010-05-06 11:36:07.000000000 +0100
@@ -33,13 +33,12 @@ function taxonomy_xml_csv_parse(&$data, 
   $new_terms     = array();
   $skipped_terms = array();
   $vocabulary    = array();
-  if ($vid) {
-    $vocabulary = taxonomy_vocabulary_load($vid);
-  }
-  else {
+  if (!$vid) {
     drupal_set_message(t('No vocab to import into. Either make one or choose one.'));
     return;
   }
+  $vocabulary = taxonomy_vocabulary_load($vid);
+  module_invoke_all('hook_taxonomy_xml_vocabulary_presave', $vocabulary);
 
   $inverses = array(
     TAXONOMY_XML_PARENT => TAXONOMY_XML_CHILD,
@@ -215,6 +214,8 @@ function taxonomy_xml_csv_parse(&$data, 
     drupal_set_message( t('Did not need to re-create %skipped_count duplicate/existing term(s)', array('%skipped_count', count($skipped_terms))) );
   }
 
+  module_invoke_all('hook_taxonomy_xml_vocabulary_postsave', $vocabulary);
+
   return $terms;
 }
 
