I'm pretty sure that the code that you have listed trys to change the base data source of the form you're working with, which is really going to work dynamically. You're going to have to set up a secondary data source, also is the schema for all of the exported xml files the same? It would have to be unless you were trying to make some sort of generic xml-editor, which there are probably some out there already.
Anyway, here's what I would do:
*Set up a secondary data source based off of the schema of one of the exported xml files (easiest way to do this is just import one of the files with a lot of blank fields)
*Set up controls and bind them to the secondary data source fields
*Write the code to pull in one of your exported xml's and merge it to the existing (blank) secondary data source
Take a look at this:
XDocument.DataObjects("name_of_your_secondary_ds").ImportFile("URI_of_your_file.xml");
Also, be sure that the URI is in relation to where the infopath form is being run/published (mainly comes into play when running forms over a network). Also make sure that when you set up the secondary data source that it is the structure only and no "" nodes otherwise every time you import an xml and then save again you'll append some "" nodes b/c the ImportFile() simply performs the "merge form" function programatically.
Hope this helps.
---------------
Matt Faus
Matt Faus / Microsoft InfoPath MVPQdabra® Software / Streamline data gathering to turn process into knowledge