--- FeedsNodeProcessor.original.inc	Wed Nov 18 16:53:48 2009
+++ FeedsNodeProcessor.inc	Wed Nov 18 21:30:51 2009
@@ -37,8 +37,35 @@ class FeedsNodeProcessor extends FeedsPr
           $node->nid = $nid;
           $node->vid = db_result(db_query('SELECT vid FROM {node} WHERE nid = %d', $nid));
         }
+	
+	if (module_exists('taxonomy')){
+		//Find out what term(s) the parent node uses
+		
+		//$terms = db_query('SELECT tid FROM {term_node} WHERE nid = %d AND vid=%d', $source->feed_nid,$src_vid);
+		//taxonomy_node_get_terms only works if we have VID set, so set it in the source.
+		$source->vid = db_result(db_query('SELECT vid FROM {node} WHERE nid = %d', $source->feed_nid));
+		$terms = taxonomy_node_get_terms($source);
+	
+		foreach ($terms as $tid => $term) {	
+			$vid = $term->vid;
+			$vocabulary = taxonomy_vocabulary_load($vid);
+			if ($vocabulary->multiple) {
+				if (!(isset($item_node->taxonomy[$vid]) && is_array($item_node->taxonomy[$vid]))) {
+					$node->taxonomy[$vid] = array();
+				}
+				if (!in_array($tid, $node->taxonomy[$vid])) {
+					$node->taxonomy[$vid][$tid] = $tid;
+				}
+			}
+			else {
+				if (!$node->taxonomy[$vid]) {
+					$node->taxonomy[$vid] = $tid;
+				}
+			}
+		}
+	}
 
-        // Save the node.
+	 // Save the node.
         node_save($node);
 
         if ($nid) {
