Replace java preferences platform-independent XML text file