Thank you, so far this seems to work for me.
However, when testing this on another Computer, I noticed that this does not work if LiveCycle Designer is not installed. This concerns xfa.host.importData() and xfa.host.exportData(). Is there another way to save and open XML-files? It would be useful to have this possibility even on Computer without LC.