Index: trunk/parsers.php
===================================================================
--- trunk/parsers.php	(revision 337621)
+++ trunk/parsers.php	(working copy)
@@ -200,7 +200,8 @@
 			'categories' => $categories,
 			'tags' => $tags,
 			'terms' => $terms,
-			'base_url' => $base_url
+			'base_url' => $base_url,
+			'version' => $wxr_version
 		);
 	}
 }
@@ -224,7 +225,7 @@
 	);
 
 	function parse( $file ) {
-		$this->is_wxr_file = $this->in_post = $this->cdata = $this->data = $this->sub_data = $this->in_tag = $this->in_sub_tag = false;
+		$this->wxr_version = $this->in_post = $this->cdata = $this->data = $this->sub_data = $this->in_tag = $this->in_sub_tag = false;
 		$this->authors = $this->posts = $this->term = $this->category = $this->tag = array();
 
 		$xml = xml_parser_create( 'UTF-8' );
@@ -243,7 +244,7 @@
 		}
 		xml_parser_free( $xml );
 
-		if ( ! $this->is_wxr_file )
+		if ( ! preg_match( '/^\d+\.\d+$/', $this->wxr_version ) )
 			return new WP_Error( 'WXR_parse_error', __( 'This does not appear to be a WXR file, missing/invalid WXR version number', 'wordpress-importer' ) );
 
 		return array(
@@ -252,7 +253,8 @@
 			'categories' => $this->category,
 			'tags' => $this->tag,
 			'terms' => $this->term,
-			'base_url' => $this->base_url
+			'base_url' => $this->base_url,
+			'version' => $this->wxr_version
 		);
 	}
 
@@ -333,7 +335,7 @@
 				$this->base_url = $this->cdata;
 				break;
 			case 'wp:wxr_version':
-				$this->is_wxr_file = preg_match( '/^\d+\.\d+$/', $this->cdata );
+				$this->wxr_version = $this->cdata;
 				break;
 
 			default:
@@ -370,15 +372,15 @@
 	}
 
 	function parse( $file ) {
-		$is_wxr = $in_post = false;
+		$wxr_version = $in_post = false;
 
 		$fp = $this->fopen( $file, 'r' );
 		if ( $fp ) {
 			while ( ! $this->feof( $fp ) ) {
 				$importline = rtrim( $this->fgets( $fp ) );
 
-				if ( ! $is_wxr && preg_match( '|<wp:wxr_version>\d+\.\d+</wp:wxr_version>|', $importline ) )
-					$is_wxr = true;
+				if ( ! $wxr_version && preg_match( '|<wp:wxr_version>(\d+\.\d+)</wp:wxr_version>|', $importline, $version ) )
+					$wxr_version = $version[1];
 
 				if ( false !== strpos( $importline, '<wp:base_site_url>' ) ) {
 					preg_match( '|<wp:base_site_url>(.*?)</wp:base_site_url>|is', $importline, $url );
@@ -433,7 +435,8 @@
 			'categories' => $this->categories,
 			'tags' => $this->tags,
 			'terms' => $this->terms,
-			'base_url' => $this->base_url
+			'base_url' => $this->base_url,
+			'version' => $wxr_version
 		);
 	}
 
Index: trunk/wordpress-importer.php
===================================================================
--- trunk/wordpress-importer.php	(revision 337621)
+++ trunk/wordpress-importer.php	(working copy)
@@ -35,6 +35,8 @@
  */
 if ( class_exists( 'WP_Importer' ) ) {
 class WP_Import extends WP_Importer {
+	var $wxr_version = 1.1; // max. supported WXR version
+
 	var $id; // WXR attachment ID
 
 	// information to import from WXR file
@@ -197,6 +199,12 @@
 			return false;
 		}
 
+		if ( $import_data['version'] > $this->wxr_version ) {
+			echo '<div class="error"><p><strong>';
+			printf( __( 'This WXR file (version %s) may not be supported by this version of the importer, please try upgrading.', 'wordpress-importer' ), esc_html($import_data['version']) );
+			echo '</strong></p></div>';
+		}
+
 		$this->get_authors_from_import( $import_data );
 
 		return true;
