> e.g. "e:\data\test.xml" does not work. You have a couple of choices e:\\data\\test.xml or file:///e:/data/test.xml assuming you are building the string in your program. If you are using a swing file chooser, just use the File object it gives you.