This will be because the settings in your database to match the old domain vs new domain.

You will be best of setting up a fresh/clean install of WordPress on your localhost XAMPP install, exporting your old data from your existing site eg. http://example.com and then importing it into your new WordPress install.