Recently I needed to migrate the contents of a Wordpress 2.1.7 (really old!) on a new installation based on Wordpress 4.9.1.

So i've exported all contents from old site using the standard export procedure, but during the import on the new platform, the process fails with this error:

Error: This does not appear to be a WXR file, missing/invalid WXR version number

The problem seems related to the lack of a version tag in the WRX file exported from the old wordpress, and starting from this information, I've found an easy fix that solve the problem (at least for me):

  1. Open the exported XML file.
  2. Before the  <channel> tag, add:
    <wp:wxr_version>1.1</wp:wxr_version>
  3. Retry the import of the file.

That's all!